Skip to content

Commit 0a5f354

Browse files
committed
fix: disable set notif button if no changes
1 parent 4bd4c44 commit 0a5f354

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

ts/components/dialog/conversationSettings/pages/notifications/NotificationPage.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ export const NotificationsPage = () => {
103103
return null;
104104
}
105105

106+
const noChanges = notificationSelected === notification;
107+
106108
return (
107109
<StyledScrollContainer style={{ position: 'relative' }}>
108110
<Flex $container={true} $flexDirection={'column'} $alignItems={'center'}>
@@ -131,7 +133,11 @@ export const NotificationsPage = () => {
131133
</PanelButtonGroup>
132134
<ButtonSpacer />
133135
<StyledButtonContainer>
134-
<SessionButton onClick={handleSetNotifications} dataTestId={'notifications-set-button'}>
136+
<SessionButton
137+
onClick={handleSetNotifications}
138+
dataTestId={'notifications-set-button'}
139+
disabled={noChanges}
140+
>
135141
{localize('set')}
136142
</SessionButton>
137143
</StyledButtonContainer>

0 commit comments

Comments
 (0)