feat: Add pages/components for authenticated flow

This commit is contained in:
Bart van der Braak 2023-06-08 00:39:28 +02:00
parent 130a4932e6
commit 6c4b88cff7
7 changed files with 478 additions and 0 deletions

View file

@ -0,0 +1,28 @@
"use client";
import Link from "next/link";
import { useSelectedLayoutSegments } from "next/navigation";
import { Hash } from "lucide-react";
import { Button } from "@/components/ui/button";
type Props = {
href: string;
channelName: string | null;
};
export const ChannelLink: React.FC<Props> = ({ href, channelName }) => {
const isActive = channelName === useSelectedLayoutSegments().at(1);
return (
<Link href={href}>
<Button
variant={isActive ? "subtle" : "ghost"}
size="sm"
className="justify-start w-full font-normal"
>
<Hash className="w-4 h-4 mr-2" />
{channelName}
</Button>
</Link>
);
};