Skip to content

Commit

Permalink
fix: infinite loop in login due to unauthorized api call
Browse files Browse the repository at this point in the history
  • Loading branch information
tanmoysrt committed Aug 23, 2024
1 parent d12c231 commit 9732085
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions dashboard/src2/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ import { Toaster } from 'vue-sonner';
import { dialogs } from './utils/components';
import { useRoute } from 'vue-router';
import { getTeam } from './data/team';
import { session } from './data/session.js';
const AppSidebar = defineAsyncComponent(() =>
import('./components/AppSidebar.vue')
Expand All @@ -56,10 +57,13 @@ const MobileNav = defineAsyncComponent(() =>
);
const route = useRoute();
const team = getTeam();
const isHideSidebar = computed(
() => route.name == 'Welcome' && team?.doc?.hide_sidebar === true
() => {
if(!session.user) return false;
const team = getTeam();
return route.name == 'Welcome' && session.user && team?.doc?.hide_sidebar === true
}
);
</script>
Expand Down

0 comments on commit 9732085

Please sign in to comment.