Skip to content

Commit

Permalink
Upgrade next
Browse files Browse the repository at this point in the history
  • Loading branch information
pontusab committed Nov 17, 2023
1 parent 7621a1e commit b819f93
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 17 deletions.
2 changes: 1 addition & 1 deletion apps/dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@vercel/toolbar": "^0.1.5",
"change-case": "^5.2.0",
"framer-motion": "^10.16.5",
"next": "14.0.3",
"next": "canary",
"next-international": "^1.1.4",
"next-safe-action": "^5.0.3",
"next-themes": "^0.2.1",
Expand Down
2 changes: 1 addition & 1 deletion apps/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@midday/location": "workspace:*",
"@midday/ui": "workspace:*",
"@vercel/analytics": "^1.1.1",
"next": "14.0.3",
"next": "canary",
"next-international": "^1.1.4",
"react": "18.2.0",
"react-dom": "18.2.0",
Expand Down
Binary file modified bun.lockb
Binary file not shown.
2 changes: 1 addition & 1 deletion packages/supabase/src/client/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const createClient = (request: NextRequest, response: NextResponse) => {
});
},
},
},
}
);

return { supabase, response };
Expand Down
33 changes: 19 additions & 14 deletions packages/supabase/src/client/server.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
"use server";

import { CookieOptions, createServerClient } from "@supabase/ssr";
import { type CookieOptions, createServerClient } from "@supabase/ssr";
import { cookies } from "next/headers";
import { Database } from "../types";

Expand All @@ -11,25 +9,32 @@ export const createClient = () => {
process.env.NEXT_PUBLIC_SUPABASE_URL!,
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!,
{
auth: {
autoRefreshToken: false,
},
cookies: {
get(name: string) {
return cookieStore.get(name)?.value;
},
set(name: string, value: string, options: CookieOptions) {
cookieStore.set({
name,
value,
...options,
});
try {
cookieStore.set({ name, value, ...options });
} catch (error) {
// The `set` method was called from a Server Component.
// This can be ignored if you have middleware refreshing
// user sessions.
}
},
remove(name: string, options: CookieOptions) {
cookieStore.set({
name,
value: "",
...options,
});
try {
cookieStore.set({ name, value: "", ...options });
} catch (error) {
// The `delete` method was called from a Server Component.
// This can be ignored if you have middleware refreshing
// user sessions.
}
},
},
},
}
);
};

0 comments on commit b819f93

Please sign in to comment.