diff --git a/src/components/AppHeader.tsx b/src/components/AppHeader.tsx index 2585dc2..edc081e 100644 --- a/src/components/AppHeader.tsx +++ b/src/components/AppHeader.tsx @@ -4,6 +4,7 @@ import { Link, useParams } from 'react-router-dom'; import { ArrowUp, Edit } from 'lucide-react'; import { cn } from '../utils/cn'; import { Button } from './Button'; +import { Input } from './Input'; type Props = { onChange?: (value: string) => void; @@ -30,10 +31,10 @@ export const AppHeader: FC = ({ onChange }) => { <>
+ />
= ({ onChange }) => { Protontweaks
- onChange?.(e.target.value)} - /> +
-
+ + + Repositories + + + } + > + + + + + + + Libraries + + + } + > + + + + ); diff --git a/src/pages/apps/Layout.tsx b/src/pages/apps/Layout.tsx index 7fab652..da847d7 100644 --- a/src/pages/apps/Layout.tsx +++ b/src/pages/apps/Layout.tsx @@ -1,17 +1,23 @@ import { useState, type FC } from 'react'; -import { Outlet, useNavigate } from 'react-router-dom'; +import { Outlet, createSearchParams, useNavigate, useSearchParams } from 'react-router-dom'; import { AppHeader } from '../../components/AppHeader'; import { SearchContext } from '../../context/search'; export const Component: FC = () => { const navigate = useNavigate(); - const [search, setSearch] = useState(''); + const [searchParams] = useSearchParams(); + const [search, setSearch] = useState(searchParams.get('search') ?? ''); return ( { - navigate('/'); + navigate({ + pathname: '/apps', + search: `?${createSearchParams({ + search: value, + })}`, + }); setSearch(value); }} /> diff --git a/tailwind.config.ts b/tailwind.config.ts index a332d03..707c902 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -2,6 +2,13 @@ import type { Config } from 'tailwindcss'; export default { content: ['./src/**/*.{html,js,mjs,ts,tsx}'], - theme: {}, + theme: { + extend: { + colors: { + secondary: '#29303d', + accent: '#1d202a', + }, + }, + }, plugins: [], } satisfies Config;