Skip to content

Commit a0febcc

Browse files
committed
gitify-app#552: "Settings" toggles; "Refresh" shows notifs
Settings now toggles btw notifications & settings; Refresh shows notifs.
1 parent 3d88d66 commit a0febcc

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/components/Sidebar.tsx

+11-2
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,24 @@ export const Sidebar: React.FC = () => {
6363
<>
6464
<button
6565
className={footerButtonClasses}
66-
onClick={fetchNotifications}
66+
onClick={() => {
67+
history.replace('/');
68+
fetchNotifications;
69+
}}
6770
aria-label="Refresh Notifications"
6871
>
6972
<IconRefresh className="w-3.5 h-3.5" />
7073
</button>
7174

7275
<button
7376
className={footerButtonClasses}
74-
onClick={() => history.push('/settings')}
77+
onClick={() => {
78+
if (window.location.hash.includes('settings')) {
79+
history.replace('/');
80+
} else {
81+
history.push('/settings');
82+
}
83+
}}
7584
aria-label="Settings"
7685
>
7786
<IconCog className="w-4 h-4" />

0 commit comments

Comments
 (0)