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" },
|
{ 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() {
|
export function RootLayout() {
|
||||||
return (
|
return (
|
||||||
<div className="app-container">
|
<div className="app-container">
|
||||||
<ExamplesNav />
|
Oi
|
||||||
<main className="app-main">
|
<main className="app-main">
|
||||||
<Routes>
|
<Routes>
|
||||||
<Route path="authentication" element={
|
<Route path="authentication" element={
|
||||||
|
|
16
src/main.tsx
16
src/main.tsx
|
@ -1,10 +1,12 @@
|
||||||
import React from "react";
|
import React from 'react'
|
||||||
import ReactDOM from "react-dom/client";
|
import ReactDOM from 'react-dom/client'
|
||||||
|
import { BrowserRouter } from 'react-router-dom'
|
||||||
import RootLayout from ".";
|
import RootLayout from ".";
|
||||||
|
|
||||||
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
|
ReactDOM.createRoot(document.getElementById('root')).render(
|
||||||
<React.StrictMode>
|
<React.StrictMode>
|
||||||
<RootLayout />
|
<BrowserRouter>
|
||||||
</React.StrictMode>,
|
<RootLayout />
|
||||||
);
|
</BrowserRouter>
|
||||||
|
</React.StrictMode>
|
||||||
|
)
|
Loading…
Add table
Reference in a new issue