feat(splash): add latest message entry
This commit is contained in:
@@ -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(" ");
|
||||
}
|
||||
Reference in New Issue
Block a user