Compare commits

...

2 Commits

Author SHA1 Message Date
db9a6a1b83 Merge pull request 'Update the way to get params from the URL' (#136) from fix-localstorage-issue into main
All checks were successful
Playwright Tests / test (push) Has been skipped
Check usage of free licenses / build-static-assets (push) Successful in 55s
Build Nginx-based docker image / build-static-assets (push) Successful in 6m20s
Reviewed-on: #136
2024-12-07 22:02:30 +00:00
b6db72a5b7 Update the way to get params from the URL
All checks were successful
Playwright Tests / test (pull_request) Has been skipped
Add copyright notice / copyright_notice (pull_request) Successful in 1m29s
Check usage of free licenses / build-static-assets (pull_request) Successful in 1m46s
2024-12-07 22:59:48 +01:00

View File

@ -1,12 +1,15 @@
/* Copyright (C) 2024 Manuel Bustillo*/ /* Copyright (C) 2024 Manuel Bustillo*/
'use client'; 'use client';
import LoginForm from '@/app/ui/components/login-form'; import LoginForm from '@/app/ui/components/login-form';
import RegistrationForm from '@/app/ui/components/registration-form'; import RegistrationForm from '@/app/ui/components/registration-form';
import { useParams } from 'next/navigation'
export default async function Page({ params }: { params: Promise<{ slug: string }> }) { export default async function Page() {
const params = useParams<{ slug: string }>()
localStorage.setItem('slug', await params.slug);
localStorage.setItem('slug', (await params).slug)
return ( return (
<main className="flex min-h-screen flex-col p-6"> <main className="flex min-h-screen flex-col p-6">
<div className="flex flex-row"> <div className="flex flex-row">