mirror of
https://github.com/bartvdbraak/omnidash.git
synced 2025-06-29 04:39:12 +00:00
feat: Add pages/components for authenticated flow
This commit is contained in:
parent
130a4932e6
commit
6c4b88cff7
7 changed files with 478 additions and 0 deletions
28
app/(authenticated)/(app)/channelLink.tsx
Normal file
28
app/(authenticated)/(app)/channelLink.tsx
Normal 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>
|
||||
);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue