From 79d0a1cf8831aa96ab325e02c8e74c068de79033 Mon Sep 17 00:00:00 2001 From: ceddybi Date: Mon, 29 Jan 2024 16:40:22 -0500 Subject: [PATCH] search jobs list --- src/app/dashboard/index.tsx | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/app/dashboard/index.tsx b/src/app/dashboard/index.tsx index 1cfa3d1..033af97 100644 --- a/src/app/dashboard/index.tsx +++ b/src/app/dashboard/index.tsx @@ -22,12 +22,18 @@ export const Dashboard = ({ state }: LayoutPageProps) => { questions = [], } = state; + const searchUrl = "https://ca.indeed.com/jobs?q="; + + const [search, setSearch] = React.useState(searchUrl); + + const handleSearch = (search: string) => { + setSearch(search); + }; + const invokeEvent = async (eventName: string, args?: any) => { await (window as any).api.invoke(eventName, args); }; - const searchUrl = "https://ca.indeed.com/jobs?q=nodejs"; - const allEvents = [ // { title: "Main", name: "list", isRunning: isListRunning, args: searchUrl }, { @@ -51,20 +57,19 @@ export const Dashboard = ({ state }: LayoutPageProps) => {
handleSearch(e.target.value)} + onChange={(e) => handleSearch(e.target.value)} />