-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4c5136e
commit 107c352
Showing
2 changed files
with
48 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,54 @@ | ||
import { Button } from "@/components/ui/button"; | ||
import { api } from "@/convex/_generated/api"; | ||
import { Id } from "@/convex/_generated/dataModel"; | ||
import { cn } from "@/lib/utils"; | ||
import { useQuery } from "convex/react"; | ||
import { Poppins } from "next/font/google"; | ||
import Image from "next/image"; | ||
import Link from "next/link"; | ||
import React from "react"; | ||
|
||
export const Info = () => { | ||
interface InfoProps { | ||
boardId: string; | ||
} | ||
|
||
const font = Poppins({ | ||
subsets: ["latin"], | ||
weight: ["600"], | ||
}); | ||
|
||
const TabSeparator = () => { | ||
return <div className="text-neutral-300 px-1.5">|</div>; | ||
}; | ||
|
||
export const Info = ({ boardId }: InfoProps) => { | ||
const data = useQuery(api.board.get, { | ||
id: boardId as Id<"boards">, | ||
}); | ||
|
||
return ( | ||
<div className="absolute top-2 left-2 bg-white rounded-md px-1.5 h-12 flex items-center shadow-md"> | ||
Info | ||
<Button asChild variant="board" className="px-2"> | ||
<Link href="/"> | ||
<Image src="/logo.svg" alt="Board Logo" height={40} width={40} /> | ||
<span | ||
className={cn( | ||
"font-semibold text-xl ml-2 text-black", | ||
font.className | ||
)} | ||
> | ||
Board | ||
</span> | ||
</Link> | ||
</Button> | ||
<TabSeparator /> | ||
<Button | ||
variant="board" | ||
className="text-base font-normal px-2" | ||
onClick={() => {}} | ||
> | ||
Title | ||
</Button> | ||
</div> | ||
); | ||
}; |