This commit is contained in:
2025-10-29 20:36:09 -07:00
commit d90a9b5826
33 changed files with 3239 additions and 0 deletions

78
webui/src/app/page.tsx Normal file
View File

@@ -0,0 +1,78 @@
"use client";
import { useEffect, useState } from "react";
import dynamic from "next/dynamic";
const Playground = dynamic(() => import("@/components/Playground"), {
ssr: false,
loading: () => (
<div
style={{
position: "absolute",
left: 0,
top: 0,
bottom: 0,
right: 0,
padding: "8px",
display: "flex",
alignItems: "center",
justifyContent: "center",
}}
>
<div>
Loading{" "}
<a
href="https://github.com/rhaiscript/playground"
target="_blank"
>
Rhai Playground
</a>
...
</div>
</div>
),
});
export default function Home() {
const [isClient, setIsClient] = useState(false);
useEffect(() => {
setIsClient(true);
}, []);
if (!isClient) {
return (
<div
id="loading"
style={{
position: "absolute",
left: 0,
top: 0,
bottom: 0,
right: 0,
padding: "8px",
display: "flex",
alignItems: "center",
justifyContent: "center",
}}
>
<div>
Loading{" "}
<a
href="https://github.com/rhaiscript/playground"
target="_blank"
>
Rhai Playground
</a>
...
</div>
</div>
);
}
return (
<main>
<Playground />
</main>
);
}