Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
Swap theme and sign-out menu items
Richie McIlroyea0ebe4f3b66
diff --git a/apps/web/app/(org)/dashboard/_components/Navbar/Top.tsx b/apps/web/app/(org)/dashboard/_components/Navbar/Top.tsxindex 32aef8f64..c7abaaf0d 100644--- a/apps/web/app/(org)/dashboard/_components/Navbar/Top.tsx+++ b/apps/web/app/(org)/dashboard/_components/Navbar/Top.tsx@@ -227,11 +227,17 @@ const User = () => {showCondition: true,},{- name: "Sign Out",- icon: <LogoutIcon />,+ name: themeLabel,+ icon: <ThemeMenuIcon />,onClick: () => {setMenuOpen(false);- signOut();+ if (document.startViewTransition) {+ document.startViewTransition(() => {+ setThemeHandler(nextTheme);+ });+ } else {+ setThemeHandler(nextTheme);+ }},iconClassName: "text-gray-11 group-hover:text-gray-12",showCondition: true,@@ -245,17 +251,11 @@ const User = () => {showCondition: true,},{- name: themeLabel,- icon: <ThemeMenuIcon />,+ name: "Sign Out",+ icon: <LogoutIcon />,onClick: () => {setMenuOpen(false);- if (document.startViewTransition) {- document.startViewTransition(() => {- setThemeHandler(nextTheme);- });- } else {- setThemeHandler(nextTheme);- }+ signOut();},iconClassName: "text-gray-11 group-hover:text-gray-12",showCondition: true,