33 lines
953 B
TypeScript
33 lines
953 B
TypeScript
"use client"
|
||
|
||
import { useState } from "react"
|
||
import { Button } from "@/components/ui/button"
|
||
import { Input } from "@/components/ui/input"
|
||
import { Label } from "@/components/ui/label"
|
||
import Link from "next/link"
|
||
|
||
export function UserProfile() {
|
||
const [isLoggedIn, setIsLoggedIn] = useState(false)
|
||
|
||
if (!isLoggedIn) {
|
||
return (
|
||
<div className="space-y-4 max-w-md mx-auto">
|
||
<Button asChild className="w-full">
|
||
<Link href="/login">Войти</Link>
|
||
</Button>
|
||
<Button asChild variant="outline" className="w-full">
|
||
<Link href="/register">Зарегистрироваться</Link>
|
||
</Button>
|
||
</div>
|
||
)
|
||
}
|
||
|
||
return (
|
||
<div className="space-y-4 max-w-md mx-auto">
|
||
<h2 className="text-xl font-semibold">Добро пожаловать, Иван Иванов!</h2>
|
||
<Button onClick={() => setIsLoggedIn(false)} className="w-full">Выйти</Button>
|
||
</div>
|
||
)
|
||
}
|
||
|