Skip to content

Commit

Permalink
added clear search
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabian-JP committed Dec 9, 2023
1 parent 7cb57bd commit 917af6d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/components/home-client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import Link from 'next/link'
import startCase from 'lodash/startCase'
import { ChangeEvent, useState } from 'react'
import { Input } from '@/components/ui/input'
import { XCircle } from 'lucide-react'

interface IFileInfo {
path: string;
Expand Down Expand Up @@ -49,12 +50,14 @@ export function HomeClient(props : IHomeClient) {
The Great Cook Up
</h1>

<div className="pb-5 pt-5">
<div className="flex flex-row justify-between pt-5 pb-5 items-center space-x-2">
<Input
placeholder="Search"
onChange={handleChange}
value={filter}
/>

<XCircle onClick={() => setFilter('')} className="cursor-pointer"/>
</div>

{files.map(file => {
Expand Down

0 comments on commit 917af6d

Please sign in to comment.