feat(splash): add latest message entry

This commit is contained in:
2026-07-08 17:05:36 +08:00
parent c46b9b4cdd
commit 2704c7f307
10 changed files with 274 additions and 73 deletions
@@ -0,0 +1,46 @@
"use client";
import { Camera, MessageCircle } from "lucide-react";
import styles from "./app-bottom-nav.module.css";
export type AppBottomNavItem = "chat" | "privateRoom";
export interface AppBottomNavProps {
activeItem?: AppBottomNavItem | null;
onChatClick: () => void;
onPrivateRoomClick: () => void;
}
export function AppBottomNav({
activeItem = null,
onChatClick,
onPrivateRoomClick,
}: AppBottomNavProps) {
return (
<nav className={styles.root} aria-label="Primary navigation">
<button
type="button"
className={getButtonClass(activeItem === "chat")}
aria-current={activeItem === "chat" ? "page" : undefined}
onClick={onChatClick}
>
<MessageCircle size={20} aria-hidden="true" />
<span>Chat</span>
</button>
<button
type="button"
className={getButtonClass(activeItem === "privateRoom")}
aria-current={activeItem === "privateRoom" ? "page" : undefined}
onClick={onPrivateRoomClick}
>
<Camera size={20} aria-hidden="true" />
<span>Elio Private room</span>
</button>
</nav>
);
}
function getButtonClass(active: boolean): string {
return [styles.button, active ? styles.active : ""].filter(Boolean).join(" ");
}