folx-tv/client/src/App.tsx
sebastjanartic 969c6912ed Add a global search feature to find articles and videos
Introduces a global search functionality with a dedicated search page and integrates a search icon/input into the header and mobile menu. The search queries articles by title, excerpt, and content, and videos by title and description. Updates are made to `App.tsx` to include the new route, and `header.tsx` to implement the search UI and logic.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 517dfa7b-26ac-463d-a6e1-a58c6df97188
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 90e58e4e-8d41-41e7-bc45-74196314bd78
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/f209e72a-0939-48fa-84fc-57854de71967/517dfa7b-26ac-463d-a6e1-a58c6df97188/jdAEdU5
Replit-Helium-Checkpoint-Created: true
2026-03-04 08:59:09 +00:00

45 lines
1.5 KiB
TypeScript

import { Switch, Route } from "wouter";
import { queryClient } from "./lib/queryClient";
import { QueryClientProvider } from "@tanstack/react-query";
import { Toaster } from "@/components/ui/toaster";
import { TooltipProvider } from "@/components/ui/tooltip";
import NotFound from "@/pages/not-found";
import Home from "@/pages/home";
import ArticlePage from "@/pages/article";
import CategoryPage from "@/pages/category";
import VideosPage from "@/pages/videos";
import GalleryPageWrapper from "@/pages/gallery";
import HoroscopePage from "@/pages/horoscope";
import RecipesPage from "@/pages/recipes";
import SearchPage from "@/pages/search";
function Router() {
return (
<Switch>
<Route path="/" component={Home} />
<Route path="/search" component={SearchPage} />
<Route path="/article/:slug" component={ArticlePage} />
<Route path="/category/:category" component={CategoryPage} />
<Route path="/videos" component={VideosPage} />
<Route path="/gallery" component={GalleryPageWrapper} />
<Route path="/horoskop" component={HoroscopePage} />
<Route path="/horoskop/:sign" component={HoroscopePage} />
<Route path="/rezepte" component={RecipesPage} />
<Route component={NotFound} />
</Switch>
);
}
function App() {
return (
<QueryClientProvider client={queryClient}>
<TooltipProvider>
<Toaster />
<Router />
</TooltipProvider>
</QueryClientProvider>
);
}
export default App;