Skip to content

Commit

Permalink
Fix layouts
Browse files Browse the repository at this point in the history
  • Loading branch information
samaradel committed Feb 6, 2025
1 parent 56be91b commit 8d9d069
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions client/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,16 @@ import Toast from "./components/Toast.vue";
const route = useRoute();
const toast = ref();
const isAuthenticated = localStorage.getItem('token');
const isAuthenticated = localStorage.getItem("token");
const layout = computed(() => {
const routeLayout = route.meta.layout || 'defaultLayout';
const routeLayout = route.meta.layout || "Default-Layout";
if (route.path === "/") {
return isAuthenticated ? 'Default-Layout' : 'No-Navbar-Layout';
return isAuthenticated ? "Default-Layout" : "No-Navbar-Layout";
}
return routeLayout === "Default" ? 'Default-Layout' : 'No-Navbar-Layout';
return routeLayout === "Default" ? "Default-Layout" : "No-Navbar-Layout";
});
</script>
<style>
body {
Expand Down

0 comments on commit 8d9d069

Please sign in to comment.