Skip to content

Commit

Permalink
refactor: add placeholder props to filters section component
Browse files Browse the repository at this point in the history
  • Loading branch information
johnshift committed Mar 12, 2024
1 parent a081ca5 commit 6930fdc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 4 additions & 1 deletion app/jobs/@list/client-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ export const JobListClientPage = ({ rawSearchParams }: Props) => {
routeSection={ROUTE_SECTIONS.JOBS}
atom={jobFiltersSearchParamsAtom}
>
<FiltersSection countAtom={jobTotalCountAtom} />
<FiltersSection
countAtom={jobTotalCountAtom}
searchPlaceholder="Enter job title, description, or organization..."
/>
<JobList />
</FiltersProvider>
);
Expand Down
5 changes: 3 additions & 2 deletions src/filters/components/filters-section/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ import { TotalCount } from './total-count';

interface Props {
countAtom: PrimitiveAtom<number | null>;
searchPlaceholder: string;
}

export const FiltersSection = ({ countAtom }: Props) => {
export const FiltersSection = ({ countAtom, searchPlaceholder }: Props) => {
return (
<div className="flex flex-col gap-4">
<FilterQueryInput placeholder="Enter job title, description, or organization..." />
<FilterQueryInput placeholder={searchPlaceholder} />

<FilterToggler countSection={<TotalCount countAtom={countAtom} />}>
<FilterConfigMapper />
Expand Down

0 comments on commit 6930fdc

Please sign in to comment.