mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 18:18:55 +00:00
- removes `NavLink` in favor of using the `href` prop on `SidebarItem`. This fixes vertical spacing between sidebar items (it was inconsistent) and DOM structure issues caused by setting `NavLink` as a direct child of `<SidebarItemGroup>`. - adds `cursor-pointer` to all `<Button>`s - adds `cursor-pointer` to the `<SidebarCollapse>` ### Before <img width="1238" alt="Screenshot 2025-06-10 at 7 57 37 PM" src="https://github.com/user-attachments/assets/2e5e66f2-d4c1-48b7-b81d-1803de2442fc" /> ### After <img width="1238" alt="Screenshot 2025-06-10 at 7 57 55 PM" src="https://github.com/user-attachments/assets/aa676fc1-124a-4e33-859d-da8f3eaad211" />
66 lines
1.7 KiB
TypeScript
66 lines
1.7 KiB
TypeScript
import React, { StrictMode } from "react";
|
|
import ReactDOM from "react-dom/client";
|
|
import App from "./components/App";
|
|
import { BrowserRouter } from "react-router";
|
|
import { createTheme, ThemeProvider } from "flowbite-react";
|
|
import * as Sentry from "@sentry/react";
|
|
|
|
const customTheme = createTheme({
|
|
sidebar: {
|
|
root: { inner: "rounded-none bg-white" },
|
|
collapse: {
|
|
button: "cursor-pointer",
|
|
},
|
|
},
|
|
button: {
|
|
base: "cursor-pointer",
|
|
color: {
|
|
default: "bg-accent-450 hover:bg-accent-700 text-white",
|
|
alternative:
|
|
"text-neutral-900 border border-neutral-200 hover:bg-neutral-300 hover:text-neutral-900",
|
|
},
|
|
},
|
|
textInput: {
|
|
field: {
|
|
input: {
|
|
colors: {
|
|
gray: "focus:ring-accent-500 focus:border-accent-500",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
toggleSwitch: {
|
|
toggle: {
|
|
checked: {
|
|
color: {
|
|
default: "bg-accent-500",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
spinner: {
|
|
color: {
|
|
default: "fill-accent-500",
|
|
},
|
|
},
|
|
});
|
|
|
|
ReactDOM.createRoot(document.getElementById("root") as HTMLElement, {
|
|
// Callback called when an error is thrown and not caught by an ErrorBoundary.
|
|
onUncaughtError: Sentry.reactErrorHandler((error, errorInfo) => {
|
|
console.warn("Uncaught error", error, errorInfo.componentStack);
|
|
}),
|
|
// Callback called when React catches an error in an ErrorBoundary.
|
|
onCaughtError: Sentry.reactErrorHandler(),
|
|
// Callback called when React automatically recovers from errors.
|
|
onRecoverableError: Sentry.reactErrorHandler(),
|
|
}).render(
|
|
<StrictMode>
|
|
<BrowserRouter>
|
|
<ThemeProvider theme={customTheme}>
|
|
<App />
|
|
</ThemeProvider>
|
|
</BrowserRouter>
|
|
</StrictMode>
|
|
);
|