Skip to content

Commit

Permalink
index: Accordion is BrowserOnly
Browse files Browse the repository at this point in the history
Signed-off-by: Raphiel Rollerscaperers <[email protected]>
  • Loading branch information
raphielscape committed Jun 17, 2024
1 parent 8bbe152 commit 4d563e3
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/pages/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import Layout from '@theme/Layout';
import BrowserOnly from '@docusaurus/BrowserOnly';
import { BrowserRouter as Router, Route, Routes } from 'react-router-dom';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import Accordian from "../components/Accordian/Accordian";
Expand All @@ -11,11 +12,15 @@ export default function Home() {
title={`Hello from ${siteConfig.title}`}
description="Description will go into a meta tag in <head />">
<main>
<Router>
<Routes>
<Route path="/" component={Accordian} />
</Routes>
</Router>
<BrowserOnly fallback={<div>Loading...</div>}>
{() => (
<Router>
<Routes>
<Route path="/" element={<Accordian />} />
</Routes>
</Router>
)}
</BrowserOnly>
</main>
</Layout>
);
Expand Down

0 comments on commit 4d563e3

Please sign in to comment.