feat: chat reactions

This commit is contained in:
gosangam
2026-08-30 01:51:52 +05:30
parent 0f382ed885
commit 8c7afe596d
19 changed files with 662 additions and 53 deletions
+28
View File
@@ -0,0 +1,28 @@
"use client";
/**
* Whether the app's own chrome should step aside for the page.
*
* A chat thread is a full-height surface with its own header and a composer
* pinned to the bottom: the tab bar competes with the composer for the same
* edge, the hamburger duplicates a back button already on screen, and the
* wordmark header stacks a second title bar above the thread's own.
*
* One hook so the header, the nav, the hamburger and the layout's bottom
* padding can never disagree — if they did, hiding one would leave a gap
* where it used to be. The desktop sidebar is deliberately unaffected: it is
* the only way out of a thread on a wide screen.
*/
import { usePathname } from "next/navigation";
/**
* True on a thread itself (`/chats/<id>`) but NOT on the inbox or a chat's
* profile page: those are ordinary scrolling pages where the tab bar belongs.
*/
export function useHidesAppChrome(): boolean {
const pathname = usePathname();
if (!pathname?.startsWith("/chats/")) return false;
// "", "chats", "<id>" — anything deeper is a sub-page like /profile.
return pathname.split("/").filter(Boolean).length === 2;
}