diff --git a/front/views/settings/NotificationView.tsx b/front/views/settings/NotificationView.tsx index 8c6bb16..82e50de 100644 --- a/front/views/settings/NotificationView.tsx +++ b/front/views/settings/NotificationView.tsx @@ -34,7 +34,7 @@ const NotificationsView = ({ navigation }) => { { - return ( -
- { translate('privBtn')} +const PrivacyView = ({ navigation }) => { + const [dataCollection, setDataCollection] = React.useState(false); + const [customAds, setCustomAds] = React.useState(false); + const [recommendations, setRecommendations] = React.useState(false); + return ( +
+ {translate("privBtn")} - + setDataCollection(!dataCollection), + }, + }, + { + type: "toggle", + title: translate("customAds"), + data: { + value: customAds, + onToggle: () => setCustomAds(!customAds), + }, + }, + { + type: "toggle", + title: translate("recommendations"), + data: { + value: recommendations, + onToggle: () => setRecommendations(!recommendations), + }, + }, + ]} + /> +
+ ); +}; - - Data Collection - - - - - Custom Adds - - - - - Recommendations - - -
- ) -} - -export default PrivacyView; \ No newline at end of file +export default PrivacyView; diff --git a/front/views/settings/SettingsView.tsx b/front/views/settings/SettingsView.tsx index db03126..25fb676 100644 --- a/front/views/settings/SettingsView.tsx +++ b/front/views/settings/SettingsView.tsx @@ -15,6 +15,7 @@ import ChangePasswordForm from '../../components/forms/changePasswordForm'; import ChangeEmailForm from '../../components/forms/changeEmailForm'; import ProfileSettings from './SettingsProfileView'; import NotificationsView from './NotificationView'; +import PrivacyView from './PrivacyView'; import API, { APIError } from '../../API'; @@ -159,31 +160,6 @@ export const PreferencesView = ({navigation}) => { ) } -export const PrivacyView = ({navigation}) => { - return ( -
- - - - - - Data Collection - - - - - Custom Adds - - - - - Recommendations - - -
- ) -} - export const ChangePasswordView = ({navigation}) => { return (