This repository has been archived on 2025-07-07. You can view files and clone it, but cannot push or open issues or pull requests.
Files
eternos/frontend/style/components/user-profile.tsx

33 lines
953 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"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>
)
}