Skip to content

Commit

Permalink
refactor: update app layout for header and user auth
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonath-z committed Jun 6, 2024
1 parent fbdae47 commit 4e43275
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
6 changes: 2 additions & 4 deletions views/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,14 @@ const App = () => {
path="/dashboard"
element={
<RootLayout>
<AppLayout>
<DashboardHeader>
<AppLayout header={<DashboardHeader><></></DashboardHeader>} >
<Dashboard />
</DashboardHeader>
</AppLayout>
</RootLayout>
}
/>


{/* </RootLayout> */}
</Routes>
</BrowserRouter>
Expand Down
File renamed without changes.
10 changes: 5 additions & 5 deletions views/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { useAuth } from "../../hooks/auth"
import Loading from "./Loading"

import styles from "./layout.module.css"
import styles from "./Layout.module.css"
import Header from "@/components/shared/Header/Header"

const AppLayout = ({ children, header }: any) => {
// const { user } = useAuth({ middleware: "auth" })
const { user } = useAuth({ middleware: "auth" })

// if (!user) {
// return <Loading />
// }
if (!user) {
return <Loading />
}

return (
<div className={styles.container}>
Expand Down

0 comments on commit 4e43275

Please sign in to comment.