Reputation: 121
Im trying to host my project on github pages, project is working good in localhost but on gh pages I got blank page and an error like this on console:
Error with Permissions-Policy header: Origin trial controlled feature not enabled: 'interest-cohort'.
Upvotes: 9
Views: 22798
Reputation: 41
I solved this is issue use the "exact" in routes
return <BrowserRouter>
<div className="App">
<Routes>
<Route exact path="/" element={ <Home /> } />
<Route exact path="startcreating" element={ <Start /> } />
<Route exact path="aboutus" element={ <About /> } />
{/* <Route path="signup" element={ <SignUpModel /> } /> */}
</Routes>
</div>
</BrowserRouter>;
Upvotes: 1
Reputation: 121
The problem is not the error message, it's because i'm using react router, so i need to define the routes according to github repo name
Before:
<Router>
<Routes>
<Route path="/" element={<Home />} />
</Routes>
</Router>
After:
<Router>
<Routes>
<Route path="/desa" element={<Home />} />
</Routes>
</Router>
Upvotes: 3