different small fixes
This commit is contained in:
@@ -49,7 +49,7 @@ export default function AnnotationSidebarNavigation({
|
||||
<h3 className="text-xs font-semibold text-gray-700 uppercase tracking-wide mb-3 px-2 flex-shrink-0">
|
||||
Samples
|
||||
</h3>
|
||||
<div className="space-y-1 overflow-y-auto max-h-96">
|
||||
<div className="space-y-1 overflow-y-auto max-h-150">
|
||||
{entries.map((entry, index) => (
|
||||
<button
|
||||
ref={index === currentIndex ? activeButtonRef : null}
|
||||
@@ -77,7 +77,7 @@ export default function AnnotationSidebarNavigation({
|
||||
/>
|
||||
{/* Entry number and filename */}
|
||||
<span className="truncate">
|
||||
{index + 1}. {`Sample ${index + 1}`}
|
||||
{`Sample ${index + 1}`}
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
|
||||
@@ -2,10 +2,12 @@
|
||||
|
||||
import { useState } from 'react';
|
||||
import { authClient } from '@/lib/auth-client';
|
||||
import { useRouter } from 'next/navigation';
|
||||
|
||||
type AuthMode = 'signin' | 'signup';
|
||||
|
||||
export function AuthForm() {
|
||||
const router = useRouter();
|
||||
const [mode, setMode] = useState<AuthMode>('signin');
|
||||
const [email, setEmail] = useState('');
|
||||
const [password, setPassword] = useState('');
|
||||
@@ -26,6 +28,8 @@ export function AuthForm() {
|
||||
});
|
||||
if (response.error) {
|
||||
setError(response.error.message || 'Authentifizierung fehlgeschlagen');
|
||||
} else {
|
||||
router.push('/');
|
||||
}
|
||||
} else {
|
||||
if (password !== confirmPassword) {
|
||||
@@ -40,7 +44,10 @@ export function AuthForm() {
|
||||
});
|
||||
if (response.error) {
|
||||
setError(response.error.message || 'Registrierung fehlgeschlagen');
|
||||
} else {
|
||||
router.push('/');
|
||||
}
|
||||
|
||||
}
|
||||
} catch (err: any) {
|
||||
setError(err.message || 'Ein Fehler ist aufgetreten');
|
||||
@@ -50,7 +57,7 @@ export function AuthForm() {
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="flex items-center justify-center py-12">
|
||||
<div className="flex items-center justify-center py-8 px-4">
|
||||
<div className="w-full max-w-md">
|
||||
{/* Card */}
|
||||
<div className="bg-white rounded-lg shadow-lg overflow-hidden border border-gray-200">
|
||||
|
||||
@@ -3,14 +3,17 @@
|
||||
import { authClient } from '@/lib/auth-client';
|
||||
import Link from 'next/link';
|
||||
import { useState } from 'react';
|
||||
import { useRouter } from 'next/navigation';
|
||||
|
||||
export function Header() {
|
||||
const router = useRouter();
|
||||
const { data: session, isPending: loading } = authClient.useSession();
|
||||
const [mobileMenuOpen, setMobileMenuOpen] = useState(false);
|
||||
|
||||
const handleSignOut = async () => {
|
||||
try {
|
||||
await authClient.signOut({});
|
||||
router.push('/');
|
||||
} catch (error) {
|
||||
console.error('Sign out failed:', error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user