Some checks failed
		
		
	
	Check usage of free licenses / build-static-assets (pull_request) Successful in 48s
				
			Playwright Tests / test (pull_request) Failing after 54s
				
			Add copyright notice / copyright_notice (pull_request) Successful in 1m4s
				
			Build Nginx-based docker image / build-static-assets (push) Failing after 2m34s
				
			
		
			
				
	
	
		
			41 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			41 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| /* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/
 | |
| 
 | |
| 'use client';
 | |
| 
 | |
| import LoginForm from '@/app/ui/components/login-form';
 | |
| import RegistrationForm from '@/app/ui/components/registration-form';
 | |
| import { useParams } from 'next/navigation'
 | |
| import { useEffect } from 'react';
 | |
| import { retrieveCSRFToken } from '../api/authentication';
 | |
| import { getCsrfToken } from '../lib/utils';
 | |
| 
 | |
| export default async function Page() {
 | |
|   const params = useParams<{ slug: string }>()
 | |
| 
 | |
|   useEffect(() => {
 | |
|     if (getCsrfToken() == 'unknown') {
 | |
|       retrieveCSRFToken();
 | |
|     }
 | |
| 
 | |
|     if (typeof window !== 'undefined') {
 | |
|       localStorage.setItem('slug', params.slug);
 | |
|     }
 | |
|   }, []);
 | |
| 
 | |
|   return (
 | |
|     <main className="flex min-h-screen flex-col p-6">
 | |
|       <div className="flex flex-row">
 | |
|         <div className="w-1/2">
 | |
|           Already have an account? Sign in
 | |
|           <LoginForm />
 | |
|         </div>
 | |
| 
 | |
|         <div className="w-1/2">
 | |
|           Don't have an account? Register now!
 | |
|           <RegistrationForm />
 | |
|         </div>
 | |
|       </div>
 | |
|     </main>
 | |
|   );
 | |
| }
 |