Skip to content

Commit

Permalink
Fix runtime error in Helmet
Browse files Browse the repository at this point in the history
Resolved the "Uncaught TypeError: Cannot read properties of undefined (reading 'add')" error occurring in the HelmetDispatcher component. This change aims to ensure proper initialization and usage of the Helmet library within the application.
[skip gpt_engineer]
  • Loading branch information
lovable-dev[bot] committed Dec 31, 2024
1 parent 1df71b7 commit c6fe858
Showing 1 changed file with 24 additions and 9 deletions.
33 changes: 24 additions & 9 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,37 @@
import { BrowserRouter as Router, Routes, Route } from "react-router-dom"
import { Toaster } from "@/components/ui/toaster"
import { Toaster as Sonner } from "@/components/ui/sonner"
import { TooltipProvider } from "@/components/ui/tooltip"
import { QueryClient, QueryClientProvider } from "@tanstack/react-query"
import { HelmetProvider } from 'react-helmet-async'
import Landing from "@/pages/Landing"
import Login from "@/pages/Login"
import Settings from "@/pages/Settings"
import WaitlistLanding from "@/pages/WaitlistLanding"
import NotFound from "@/pages/NotFound"
import "./App.css"

const queryClient = new QueryClient()

function App() {
return (
<Router>
<Routes>
<Route path="/" element={<Landing />} />
<Route path="/login" element={<Login />} />
<Route path="/settings" element={<Settings />} />
<Route path="/waitlist" element={<WaitlistLanding />} />
<Route path="*" element={<NotFound />} />
</Routes>
</Router>
<HelmetProvider>
<QueryClientProvider client={queryClient}>
<TooltipProvider>
<Toaster />
<Sonner />
<Router>
<Routes>
<Route path="/" element={<Landing />} />
<Route path="/login" element={<Login />} />
<Route path="/settings" element={<Settings />} />
<Route path="/waitlist" element={<WaitlistLanding />} />
<Route path="*" element={<NotFound />} />
</Routes>
</Router>
</TooltipProvider>
</QueryClientProvider>
</HelmetProvider>
)
}

Expand Down

0 comments on commit c6fe858

Please sign in to comment.