Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion components/dashboard-components/AppSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ export default function AppSidebar() {
</Button>
</SidebarMenuItem>
<SidebarMenuItem>
<SearchDialog/>
<SearchDialog
Variant="SidebarMenuButton"
WithTheTitle={true}
IconSize="16"
/>
</SidebarMenuItem>
</SidebarMenu>
</SidebarGroupContent>
Expand Down
18 changes: 8 additions & 10 deletions components/dashboard-components/FloatingNavbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { useState } from "react";
import { Button } from "../ui/button";
import { CircleUser, Home, Plus, Search , CircleUserRound,CreditCard, LogOut } from 'lucide-react';
import Link from "next/link";
import { truncate } from "fs";
import SearchDialog from "./SearchDialog";
export default function FloatingNavbar() {
const User = useQuery(api.users.viewer);
const router = useRouter();
Expand Down Expand Up @@ -56,16 +56,14 @@ export default function FloatingNavbar() {
variant="Trigger"
className=" justify-center text-brand_tertiary/50 hover:text-brand_tertiary">
<Link href="/dashboard">
<Home />
<Home size="24"/>
</Link>
</Button>
<Button
variant="Trigger"
className=" justify-center text-brand_tertiary/50 hover:text-brand_tertiary"
disabled={true}
>
<Search />
</Button>
<SearchDialog
Variant="Trigger"
WithTheTitle={false}
IconSize="24"
/>
<Button
variant="Trigger"
className=" justify-center text-brand_tertiary/50 hover:text-brand_tertiary"
Expand All @@ -74,7 +72,7 @@ export default function FloatingNavbar() {
}
disabled={handleCreateTableloading}
>
<Plus />
<Plus size="24"/>
</Button>
<DropdownMenu>
<DropdownMenuTrigger asChild>
Expand Down
15 changes: 11 additions & 4 deletions components/dashboard-components/SearchDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@ import { useQuery } from "convex/react"
import { api } from "@/convex/_generated/api"
import { useState } from "react"
import { useRouter } from "next/navigation"
export default function SearchDialog() {
interface SearchDialogProps{
Variant:"SidebarMenuButton" | "Trigger",
WithTheTitle:boolean,
IconSize:"16"|"24"
}
export default function SearchDialog({Variant,WithTheTitle,IconSize}:SearchDialogProps) {
const viwer = useQuery(api.users.viewer);
const getNotes = useQuery(api.mutations.notes.getNoteByUserId,{userid:viwer?._id});
const router = useRouter()
Expand All @@ -44,11 +49,13 @@ export default function SearchDialog() {
<Dialog>
<DialogTrigger asChild>
<Button
variant="SidebarMenuButton"
variant={Variant}
className=" px-2 h-8 group"
>
<Search size="16" />
<span>Search</span>
<Search size={IconSize} />
{
WithTheTitle&&<span>Search</span>
}
</Button>
</DialogTrigger>
<DialogContent className=" p-2 bg-brand_fourthary rounded-lg border-brand_tertiary/10 md:min-w-[450px]">
Expand Down