#Hello, ⭐ Uncaught Error: [main] is not a <Route> component. All component children of <Routes> must
1 messages · Page 1 of 1 (latest)
i'm not used to reactRouter, but you seems to only have route children, so maybe something like this ?
<BrowserRouter>
<Routes>
<Route
path="/main" element={<main className="flex justify-center items-center bg-blue-400 h-[100vh] w-full">
{forecast ? (
<Route path="/forecast" element={<Forecast data={forecast} />} />
) : (
<Route
path="/search"
element={
<Search
term={term}
options={options}
onInputChange={onInputChange}
onOptionSelect={onOptionSelect}
onSubmit={onSubmit}
/>
}
/>
)}
</main>}
/>
</Routes>
</BrowserRouter>