Files
Arkie-Library-Frontend/src/main.tsx
TerryM 2c76039c44
All checks were successful
Deploy to Frontend Servers / deploy (push) Successful in 49s
feat: apply figma responsive home design
2026-05-17 19:38:43 +08:00

32 lines
805 B
TypeScript

import React from "react";
import ReactDOM from "react-dom/client";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import "./index.css";
const queryClient = new QueryClient();
const adminOnly = import.meta.env.VITE_ADMIN_ONLY === "true";
void (async () => {
const root = document.getElementById("root")!;
if (adminOnly) {
const { default: AppAdminOnly } = await import("./AppAdminOnly");
ReactDOM.createRoot(root).render(
<React.StrictMode>
<AppAdminOnly />
</React.StrictMode>,
);
return;
}
const { default: App } = await import("./App");
ReactDOM.createRoot(root).render(
<React.StrictMode>
<QueryClientProvider client={queryClient}>
<App />
</QueryClientProvider>
</React.StrictMode>,
);
})();