11import * as React from "react" ;
22import { CommandIcon , TextIcon } from "lucide-react" ;
3- import {
4- CommandDialog ,
5- CommandEmpty ,
6- CommandInput ,
7- CommandItem ,
8- CommandList ,
9- CommandSeparator ,
10- CommandGroup ,
11- } from "@/components/ui/command" ;
12- import {
13- Tooltip ,
14- TooltipContent ,
15- TooltipProvider ,
16- TooltipTrigger ,
17- } from "@/components/ui/tooltip" ;
3+ import { CommandDialog , CommandEmpty , CommandInput , CommandItem , CommandList , CommandSeparator } from "@/components/ui/command" ;
4+ import { Tooltip , TooltipContent , TooltipProvider , TooltipTrigger } from "@/components/ui/tooltip" ;
185import { Button } from "@/components/ui/button" ;
196import { useRouter } from "next/router" ;
207import { useFetch } from "usehooks-ts" ;
@@ -55,13 +42,8 @@ export function SearchCommandDialog() {
5542 < TooltipProvider >
5643 < Tooltip >
5744 < TooltipTrigger asChild >
58- < Button
59- aria-label = "Search article"
60- variant = "secondary"
61- size = { "icon" }
62- onClick = { ( ) => setOpen ( ! open ) }
63- >
64- < CommandIcon className = "h-5 w-5" />
45+ < Button aria-label = "Search article" variant = { "ghost" } size = { "icon" } onClick = { ( ) => setOpen ( ! open ) } >
46+ < CommandIcon className = "nx-h-5 nx-w-5" />
6547 </ Button >
6648 </ TooltipTrigger >
6749
@@ -72,9 +54,9 @@ export function SearchCommandDialog() {
7254 </ TooltipProvider >
7355
7456 < CommandDialog open = { open } onOpenChange = { setOpen } >
75- < CommandInput placeholder = { " Search here..." } />
57+ < CommandInput placeholder = { "Search here..." } />
7658
77- < CommandList >
59+ < CommandList className = "mx-2" >
7860 < CommandEmpty > No results found.</ CommandEmpty >
7961 { data &&
8062 Object . entries ( data ) . map ( ( [ key , value ] ) => {
@@ -85,14 +67,13 @@ export function SearchCommandDialog() {
8567 if ( value . data ) {
8668 return (
8769 < SubCommandItem
88- className = "border-l-2 ml-3 my-2 "
70+ className = "nx- ml-3 nx- my-2 "
8971 key = { key + value . title }
9072 value = { value . title }
9173 >
92- < div className = "flex w-fill flex-row items-center justify-around" >
93- < TextIcon className = "h-5 w-5 mr-2" />
94-
95- < Link className = "block text-sm" href = { key } >
74+ < div className = "nx-flex nx-w-fill nx-flex-row nx-items-center nx-justify-around" >
75+ < TextIcon className = "nx-h-5 nx-w-5 nx-mr-2" />
76+ < Link className = "nx-block nx-text-sm" href = { key } >
9677 { value . title }
9778 </ Link >
9879 </ div >
0 commit comments