build: add react vite scaffold
This commit is contained in:
parent
abfb885851
commit
f6d6d39a7b
9 changed files with 254 additions and 8 deletions
32
src/App.tsx
Normal file
32
src/App.tsx
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
import type { DashboardRuntimeState } from "$lib/server/dashboard";
|
||||
|
||||
export function AppStateView({
|
||||
dashboard,
|
||||
}: {
|
||||
dashboard: DashboardRuntimeState;
|
||||
}) {
|
||||
if (dashboard.state === "ready") {
|
||||
return <main>{dashboard.document.metadata.title}</main>;
|
||||
}
|
||||
|
||||
return (
|
||||
<main className="state-shell" data-dashboard-state={dashboard.state}>
|
||||
<h1>{dashboard.title}</h1>
|
||||
<p>{dashboard.subtitle}</p>
|
||||
<p>{dashboard.message}</p>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
export default function App() {
|
||||
return (
|
||||
<AppStateView
|
||||
dashboard={{
|
||||
state: "loading",
|
||||
title: "Loading Dashboard",
|
||||
subtitle: "Fetching active model",
|
||||
message: "Waiting for the active dashboard document.",
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue