<script lang="ts">
	import LoginForm from '$lib/components/auth/LoginForm.svelte';
	import { page } from '$app/stores';
	import { browser } from '$app/environment';

	$: redirect = browser ? ($page.url.searchParams.get('r') || undefined) : undefined;
</script>

<svelte:head>
	<title>Login - openplace</title>
</svelte:head>

<div class="min-h-screen bg-base-200 flex items-center justify-center p-4">
	<div class="bg-base-100 rounded-box shadow-xl p-8 max-w-md w-full">
		<LoginForm {redirect} />
	</div>
</div>
