From c3dcb9c827df6d80ad1b0b1a7c6155561527b39d Mon Sep 17 00:00:00 2001
From: l3wdfut4pwr <l3wdfut4pwr@gmail.com>
Date: Tue, 30 Dec 2025 13:46:39 +0200
Subject: init

---
 src/components/header/ProfileOrLogin.tsx | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 src/components/header/ProfileOrLogin.tsx

(limited to 'src/components/header/ProfileOrLogin.tsx')

diff --git a/src/components/header/ProfileOrLogin.tsx b/src/components/header/ProfileOrLogin.tsx
new file mode 100644
index 0000000..38c1eb1
--- /dev/null
+++ b/src/components/header/ProfileOrLogin.tsx
@@ -0,0 +1,25 @@
+'use client';
+
+import Image from 'next/image';
+import { useUser } from '../../lib/contexts';
+import { Button } from '../ui';
+import Link from 'next/link';
+
+export function ProfileOrLogin() {
+    const user = useUser();
+
+    if (!user) {
+        return <Button className="py-2.5 px-3.75">ВОЙТИ</Button>;
+    }
+
+    return (
+        <Link href={'/profile'}>
+            <Image
+                src={user?.avatar ?? 'icons/avatar.svg'}
+                alt=""
+                width={60}
+                height={60}
+            />
+        </Link>
+    );
+}
-- 
cgit v1.3-3-g829e

