Skip to content

Commit

Permalink
fix: no need for inertia.always
Browse files Browse the repository at this point in the history
  • Loading branch information
limwa committed Jan 22, 2025
1 parent e2af983 commit 3f98a65
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions website/config/inertia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@ const inertiaConfig = defineConfig({
*/
sharedData: {
environment: env.public(),
auth: async ({ auth, inertia }) => {
return inertia.always(async (): Promise<AuthenticationData> => {
if (!auth.authenticationAttempted) await auth.check()
auth: async ({ auth }): Promise<AuthenticationData> => {
if (!auth.authenticationAttempted) await auth.check()

const user = auth.user
if (!user) return { authenticated: false }
return { authenticated: true, user: { email: user.email } }
})
const user = auth.user
if (!user) return { authenticated: false }
return { authenticated: true, user: { email: user.email } }
},
},

Expand Down

0 comments on commit 3f98a65

Please sign in to comment.