File tree Expand file tree Collapse file tree 3 files changed +28
-4
lines changed Expand file tree Collapse file tree 3 files changed +28
-4
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ export default component$(() => {
11
11
return (
12
12
< Layout >
13
13
< Container position = "center" width = "small" >
14
- < div class = "felx -nowrap flex min-h-[calc(100vh-76px)] flex-col items-center justify-center" >
14
+ < div class = "flex -nowrap flex min-h-[calc(100vh-76px)] flex-col items-center justify-center" >
15
15
< div class = "rounded-lg bg-white p-10 text-center shadow-sm" >
16
16
< h1 class = "h1 mb-20" > Welcome</ h1 >
17
17
< Button
Original file line number Diff line number Diff line change @@ -6,6 +6,18 @@ import type { GetSessionResult } from '@auth/qwik';
6
6
7
7
export type SessionData = Awaited < GetSessionResult > [ 'data' ] ;
8
8
9
+ // Uncomment the following to mock an authenticated user
10
+ // export const onRequest = async ({ sharedMap, env }: { sharedMap: Map<string, any>; env: any }) => {
11
+ // sharedMap.set('session', {
12
+ // expires: new Date(0).toString(),
13
+ // user: {
14
+ // id: 'user',
15
+ // name: 'user',
16
+ // email: 'user@localhost',
17
+ // },
18
+ // } as SessionData);
19
+ // };
20
+
9
21
export const useUserSession = routeLoader$ ( ( { sharedMap, redirect, url } ) => {
10
22
const session = sharedMap . get ( 'session' ) as SessionData ;
11
23
if ( session && url . pathname === '/' ) {
Original file line number Diff line number Diff line change @@ -7,6 +7,21 @@ import tsconfigPaths from 'vite-tsconfig-paths';
7
7
import tailwindcss from '@tailwindcss/vite' ;
8
8
9
9
export default defineConfig ( {
10
+ environments : {
11
+ client : {
12
+ optimizeDeps : {
13
+ exclude : [ '@auth/qwik' , '@modular-forms/qwik' ] ,
14
+ } ,
15
+ } ,
16
+ ssr : {
17
+ build : {
18
+ sourcemap : true ,
19
+ } ,
20
+ resolve : {
21
+ noExternal : [ '@auth/qwik' , '@modular-forms/qwik' ] ,
22
+ } ,
23
+ } ,
24
+ } ,
10
25
plugins : [
11
26
macroPlugin ( { preset : 'pandacss' } ) ,
12
27
qwikRouter ( ) ,
@@ -22,7 +37,4 @@ export default defineConfig({
22
37
'Cache-Control' : 'public, max-age=600' ,
23
38
} ,
24
39
} ,
25
- optimizeDeps : {
26
- include : [ '@auth/core' ] ,
27
- } ,
28
40
} ) ;
You can’t perform that action at this time.
0 commit comments