Skip to content

Commit

Permalink
feat: tweak sidebar toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharis278 committed May 7, 2024
1 parent 041d22e commit eba6583
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ const NotificationsWidget = () => {
verification_status: verificationStatus,
};

const onToggleSidebar = () => {
toggleSidebar(currentSidebar, WIDGETS.NOTIFICATIONS);
};

// After three seconds, update notificationSeen (to hide red dot)
useEffect(() => {
setTimeout(onNotificationSeen, 3000);
Expand All @@ -75,7 +79,7 @@ const NotificationsWidget = () => {
courseId,
notificationCurrentState: upgradeNotificationCurrentState,
setNotificationCurrentState: setUpgradeNotificationCurrentState,
toggleSidebar: () => toggleSidebar(currentSidebar, WIDGETS.NOTIFICATIONS),
toggleSidebar: onToggleSidebar,
}}
>
<UpgradeNotification
Expand All @@ -92,7 +96,7 @@ const NotificationsWidget = () => {
org={org}
upgradeNotificationCurrentState={upgradeNotificationCurrentState}
setupgradeNotificationCurrentState={setUpgradeNotificationCurrentState}
toggleSidebar={() => toggleSidebar(currentSidebar, WIDGETS.NOTIFICATIONS)}
toggleSidebar={onToggleSidebar}
/>
</PluginSlot>
</div>
Expand Down

0 comments on commit eba6583

Please sign in to comment.