misc: icons and titles

This commit is contained in:
2026-04-15 21:48:22 -04:00
Unverified
parent d27cc3cf07
commit 90bfee5861
5 changed files with 37 additions and 2 deletions

View File

@@ -1,4 +1,5 @@
"use client";
import Image from "next/image";
import Link from "next/link";
import { SubmitEvent, useEffect, useState } from "react";
import { Settings, X } from "lucide-react";
@@ -51,7 +52,13 @@ export default function Nav() {
href="/"
className="text-lg font-bold text-white flex items-center gap-2"
>
<span className="text-2xl">🔴</span>
<Image
src="/icon.png"
alt="Connect4 Observer icon"
width={32}
height={32}
className="h-8 w-8 rounded-sm"
/>
<span>Connect4 Observer</span>
</Link>

View File

@@ -0,0 +1,21 @@
"use client";
import { useEffect } from "react";
import { useConnection } from "@/lib/connection";
const DEFAULT_TITLE = "Connect4 RPI Minds & Machines";
export default function PageTitleManager() {
const { role, username } = useConnection();
useEffect(() => {
if (role === "player" && username.trim()) {
document.title = `${username.trim()} - ${DEFAULT_TITLE}`;
return;
}
document.title = DEFAULT_TITLE;
}, [role, username]);
return null;
}