refactor: update configuration files and styles, migrate to new CSS structure, and clean up imports
This commit is contained in:
parent
878ce97c54
commit
fa525f6090
2 changed files with 10 additions and 32 deletions
|
@ -21,34 +21,10 @@ const examples = [
|
|||
{ name: "Help", href: "help" },
|
||||
];
|
||||
|
||||
const ExamplesNav = () => {
|
||||
const location = useLocation();
|
||||
const navigate = useNavigate();
|
||||
|
||||
return (
|
||||
<div className="examples-nav-container">
|
||||
<div className="examples-nav-inner">
|
||||
{examples.map((example) => (
|
||||
<button
|
||||
key={example.href}
|
||||
onClick={() => navigate(example.href)}
|
||||
className={`example-button ${
|
||||
location.pathname.includes(example.href) ? 'active' : ''
|
||||
}`}
|
||||
>
|
||||
{example.name}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
export function RootLayout() {
|
||||
return (
|
||||
<div className="app-container">
|
||||
<ExamplesNav />
|
||||
Oi
|
||||
<main className="app-main">
|
||||
<Routes>
|
||||
<Route path="authentication" element={
|
||||
|
|
16
src/main.tsx
16
src/main.tsx
|
@ -1,10 +1,12 @@
|
|||
import React from "react";
|
||||
import ReactDOM from "react-dom/client";
|
||||
|
||||
import React from 'react'
|
||||
import ReactDOM from 'react-dom/client'
|
||||
import { BrowserRouter } from 'react-router-dom'
|
||||
import RootLayout from ".";
|
||||
|
||||
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
|
||||
ReactDOM.createRoot(document.getElementById('root')).render(
|
||||
<React.StrictMode>
|
||||
<RootLayout />
|
||||
</React.StrictMode>,
|
||||
);
|
||||
<BrowserRouter>
|
||||
<RootLayout />
|
||||
</BrowserRouter>
|
||||
</React.StrictMode>
|
||||
)
|
Loading…
Add table
Reference in a new issue