Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(notifications): hide profile sync toggle #10900

Merged
merged 2 commits into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion app/components/UI/ProfileSyncing/ProfileSyncing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ import styles from './ProfileSyncing.styles';
import { ProfileSyncingComponentProps } from './ProfileSyncing.types';
import AppConstants from '../../../core/AppConstants';
import { useProfileSyncing } from '../../../util/notifications/hooks/useProfileSyncing';
import { isNotificationsFeatureEnabled } from '../../../util/notifications';

export default function ProfileSyncingComponent({
function ProfileSyncingComponent({
handleSwitchToggle,
isBasicFunctionalityEnabled,
isProfileSyncingEnabled,
Expand Down Expand Up @@ -62,3 +63,13 @@ export default function ProfileSyncingComponent({
</View>
);
}

export default function ProfileSyncingContainer(
Prithpal-Sooriya marked this conversation as resolved.
Show resolved Hide resolved
props: Readonly<ProfileSyncingComponentProps>,
) {
if (!isNotificationsFeatureEnabled()) {
return null;
}

return <ProfileSyncingComponent {...props} />;
}
Original file line number Diff line number Diff line change
@@ -1,92 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`ProfileSyncing should render correctly 1`] = `
<View
style={
{
"marginVertical": 16,
}
}
>
<View
style={
{
"alignItems": "center",
"flexDirection": "row",
"justifyContent": "space-between",
"paddingBottom": 8,
}
}
>
<Text
accessibilityRole="text"
style={
{
"color": "#141618",
"fontFamily": "EuclidCircularB-Bold",
"fontSize": 16,
"fontWeight": "700",
"letterSpacing": 0,
"lineHeight": 24,
}
}
>
Profile Sync
</Text>
<RCTSwitch
accessibilityRole="switch"
disabled={true}
onChange={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
onTintColor="#0376c9"
style={
[
{
"height": 31,
"width": 51,
},
{
"backgroundColor": "#bbc0c566",
"borderRadius": 16,
},
]
}
thumbTintColor="#ffffff"
tintColor="#bbc0c566"
value={false}
/>
</View>
<Text
accessibilityRole="text"
style={
{
"color": "#6a737d",
"fontFamily": "EuclidCircularB-Regular",
"fontSize": 14,
"fontWeight": "400",
"letterSpacing": 0,
"lineHeight": 22,
}
}
>
Creates a profile that MetaMask uses to sync some settings among your devices. This is required to get notifications.
<Text
accessibilityRole="text"
onPress={[Function]}
style={
{
"color": "#0376c9",
"fontFamily": "EuclidCircularB-Regular",
"fontSize": 14,
"fontWeight": "400",
"letterSpacing": 0,
"lineHeight": 22,
}
}
>
Learn how we protect your privacy
</Text>
</Text>
</View>
`;
exports[`ProfileSyncing should render correctly 1`] = `null`;
Original file line number Diff line number Diff line change
Expand Up @@ -131,94 +131,6 @@ exports[`DefaultSettings should render correctly 1`] = `
to learn more.
</Text>
</View>
<View
style={
{
"marginVertical": 16,
}
}
>
<View
style={
{
"alignItems": "center",
"flexDirection": "row",
"justifyContent": "space-between",
"paddingBottom": 8,
}
}
>
<Text
accessibilityRole="text"
style={
{
"color": "#141618",
"fontFamily": "EuclidCircularB-Bold",
"fontSize": 16,
"fontWeight": "700",
"letterSpacing": 0,
"lineHeight": 24,
}
}
>
Profile Sync
</Text>
<RCTSwitch
accessibilityRole="switch"
disabled={true}
onChange={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
onTintColor="#0376c9"
style={
[
{
"height": 31,
"width": 51,
},
{
"backgroundColor": "#bbc0c566",
"borderRadius": 16,
},
]
}
thumbTintColor="#ffffff"
tintColor="#bbc0c566"
value={false}
/>
</View>
<Text
accessibilityRole="text"
style={
{
"color": "#6a737d",
"fontFamily": "EuclidCircularB-Regular",
"fontSize": 14,
"fontWeight": "400",
"letterSpacing": 0,
"lineHeight": 22,
}
}
>
Creates a profile that MetaMask uses to sync some settings among your devices. This is required to get notifications.
<Text
accessibilityRole="text"
onPress={[Function]}
style={
{
"color": "#0376c9",
"fontFamily": "EuclidCircularB-Regular",
"fontSize": 14,
"fontWeight": "400",
"letterSpacing": 0,
"lineHeight": 22,
}
}
>
Learn how we protect your privacy
</Text>
</Text>
</View>
<View
style={
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -858,94 +858,6 @@ exports[`SecuritySettings should render correctly 1`] = `
</Text>
</View>
</View>
<View
style={
{
"marginVertical": 16,
}
}
>
<View
style={
{
"alignItems": "center",
"flexDirection": "row",
"justifyContent": "space-between",
"paddingBottom": 8,
}
}
>
<Text
accessibilityRole="text"
style={
{
"color": "#141618",
"fontFamily": "EuclidCircularB-Bold",
"fontSize": 16,
"fontWeight": "700",
"letterSpacing": 0,
"lineHeight": 24,
}
}
>
Profile Sync
</Text>
<RCTSwitch
accessibilityRole="switch"
disabled={true}
onChange={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
onTintColor="#0376c9"
style={
[
{
"height": 31,
"width": 51,
},
{
"backgroundColor": "#bbc0c566",
"borderRadius": 16,
},
]
}
thumbTintColor="#ffffff"
tintColor="#bbc0c566"
value={true}
/>
</View>
<Text
accessibilityRole="text"
style={
{
"color": "#6a737d",
"fontFamily": "EuclidCircularB-Regular",
"fontSize": 14,
"fontWeight": "400",
"letterSpacing": 0,
"lineHeight": 22,
}
}
>
Creates a profile that MetaMask uses to sync some settings among your devices. This is required to get notifications.
<Text
accessibilityRole="text"
onPress={[Function]}
style={
{
"color": "#0376c9",
"fontFamily": "EuclidCircularB-Regular",
"fontSize": 14,
"fontWeight": "400",
"letterSpacing": 0,
"lineHeight": 22,
}
}
>
Learn how we protect your privacy
</Text>
</Text>
</View>
<Text
accessibilityRole="text"
style={
Expand Down
Loading