chore: revert standalone output and harden home page auth check
This commit is contained in:
BIN
.next/cache/webpack/client-development/index.pack.gz
vendored
BIN
.next/cache/webpack/client-development/index.pack.gz
vendored
Binary file not shown.
Binary file not shown.
@@ -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}"
|
||||||
@@ -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
@@ -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 }) => {
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user