Skip to content

Commit

Permalink
fix: don't pass locations until necessary
Browse files Browse the repository at this point in the history
$ tsc && vite build
src/main.tsx:15:46 - error TS2322: Type '{ locations: Locations; }' is not assignable to type 'IntrinsicAttributes'.
  Property 'locations' does not exist on type 'IntrinsicAttributes'.

15           <Route path="/" element={<HomePage locations={locations} />} />
  • Loading branch information
yosevu committed Oct 18, 2022
1 parent 5147d5a commit d4ab707
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
<BrowserRouter basename={`${import.meta.env['BASE_URL']}`}>
<Routes>
<Route path="/" element={<App />}>
<Route path="/" element={<HomePage locations={locations} />} />
<Route path="/" element={<HomePage />} />
<Route path="/locations/:id" element={<div>Location Page</div>} />
<Route path="/locations/new" element={<div>New Location Page</div>} />
<Route path="/reviews/new" element={<div>New Review Page</div>} />
Expand Down

0 comments on commit d4ab707

Please sign in to comment.