diff --git a/next.config.js b/next.config.js index 3ce97eb..9ef75a3 100644 --- a/next.config.js +++ b/next.config.js @@ -2,11 +2,18 @@ const path = require('path'); /** @type {import('next').NextConfig} */ const nextConfig = { - output: 'export', distDir: 'out', sassOptions: { includePaths: [path.join(__dirname, 'styles')], }, + async rewrites() { + return [ + { + source: '/api/:path*', + destination: 'http://localhost:5000/:path*', // Proxy to Backend IMPORTANT TO SET THE CORRECT PORT + }, + ]; + } }; module.exports = nextConfig; diff --git a/src/app/_components/sessiondata.tsx b/src/app/_components/sessiondata.tsx index 29d362c..39f726f 100644 --- a/src/app/_components/sessiondata.tsx +++ b/src/app/_components/sessiondata.tsx @@ -8,7 +8,10 @@ import { setSession } from '../_helpers/auth'; export default function Sessiondata() { const pathname: string = usePathname().substring(1); - var username: string = localStorage.getItem('username') || ''; + var username: string = ''; + // if(typeof window !== 'undefined'){ + username = localStorage.getItem('username') || ''; + // } if (pathname === 'register' || pathname === 'login') { return null; diff --git a/src/app/_helpers/auth.tsx b/src/app/_helpers/auth.tsx index c91ea87..0433a98 100644 --- a/src/app/_helpers/auth.tsx +++ b/src/app/_helpers/auth.tsx @@ -54,7 +54,7 @@ export function RegisterForm() { + + +
+ +
+ + )} + + + ); +} diff --git a/src/app/register/page.tsx b/src/app/register/page.tsx index c4aa4b2..a0243a6 100644 --- a/src/app/register/page.tsx +++ b/src/app/register/page.tsx @@ -12,7 +12,7 @@ export const metadata: Metadata = { openGraph: { ...openGraphMetadata, title: 'Create an account', - url: 'https://quiztimes.nl/register', + url: 'https://Forum.nl/register', }, }; diff --git a/src/styles/_colors.scss b/src/styles/_colors.scss index 5225f92..af55770 100644 --- a/src/styles/_colors.scss +++ b/src/styles/_colors.scss @@ -4,6 +4,8 @@ $colors: ( brand: hsl(237, 100%, 70%), + brand-dark: hsl(237, 100%, 60%), + brand-light: hsl(237, 100%, 80%), white: hsl(0, 0%, 100%), off-white: hsl(0, 0%, 96%), gray: hsl(0, 0%, 50%),