chore: revert standalone output and harden home page auth check

This commit is contained in:
2025-12-18 09:06:57 +01:00
parent 56178cea81
commit 1a0a132182
7 changed files with 14 additions and 10 deletions

View File

@@ -1 +1 @@
self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"l/OPnKIRnN1BmFcrFRSIU/W1xSwGbL96ruq9ikQxP4c=\"\n}" self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"VrDE327/KbcRJ3uCy3S1rduGiQ+mf2ceOet4fh0iQnc=\"\n}"

View File

@@ -1,5 +1,5 @@
{ {
"node": {}, "node": {},
"edge": {}, "edge": {},
"encryptionKey": "l/OPnKIRnN1BmFcrFRSIU/W1xSwGbL96ruq9ikQxP4c=" "encryptionKey": "VrDE327/KbcRJ3uCy3S1rduGiQ+mf2ceOet4fh0iQnc="
} }

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,5 @@
/** @type {import('next').Config} */ /** @type {import('next').Config} */
const nextConfig = { const nextConfig = {
output: 'standalone',
productionBrowserSourceMaps: false, productionBrowserSourceMaps: false,
transpilePackages: ['@supabase/auth-helpers-nextjs'], transpilePackages: ['@supabase/auth-helpers-nextjs'],
webpack: (config, { isServer, dev }) => { webpack: (config, { isServer, dev }) => {

View File

@@ -15,11 +15,16 @@ export default function Home() {
useEffect(() => { useEffect(() => {
// Check session // Check session
const checkUser = async () => { const checkUser = async () => {
const { data: { session } } = await supabase.auth.getSession(); try {
const { data: { session }, error } = await supabase.auth.getSession();
if (error) {
console.error('Session retrieval error:', error);
}
setUser(session?.user ?? null); setUser(session?.user ?? null);
if (session?.user) { } catch (err) {
fetchCollection(); console.error('Fatal error checking user:', err);
} else { setUser(null);
} finally {
setIsLoading(false); setIsLoading(false);
} }
}; };