minor tweaks to loading. move it outside the return.

This commit is contained in:
iamBadgers committed 2026-10-20 17:19:47 -07:00
1 parent c355e55d67
commit 2a61649fcb
7 files changed
+57 -117

No files matched your search

+8 -52
View File
@@ -4,21 +4,17 @@ const baseUrl = typeof window !== 'undefined'
? window.location.origin
: process.env.VITE_VERCEL_URL || 'http://localhost:5173'; // Fallback for your server env
const st = await fetch(`${baseUrl}/characters/collateral/stats.json`)
.then(r => r.json());
const sk = await
fetch(`${baseUrl}/characters/collateral/skills.json`)
.then(r => r.json());
export function Welcome() {
const [stats, setStats] = useState([]);
const [skills, setSkills] = useState([])
useEffect(() => {
fetch(`${baseUrl}/characters/collateral/stats.json`)
.then(r => r.json())
.then(j => setStats(j));
fetch(`${baseUrl}/characters/collateral/skills.json`)
.then(r => r.json())
.then(j => setSkills(j))
});
const [stats, setStats] = useState(st);
const [skills, setSkills] = useState(sk)
return (
<main>
@@ -73,46 +69,6 @@ export function Welcome() {
</tbody>
</table>
</main >
/* <main className="flex items-center justify-center pt-16 pb-4">
<div className="flex-1 flex flex-col items-center gap-16 min-h-0">
<header className="flex flex-col items-center gap-9">
<div className="w-[500px] max-w-[100vw] p-4">
<img
src={logoLight}
alt="React Router"
className="block w-full dark:hidden"
/>
<img
src={logoDark}
alt="React Router"
className="hidden w-full dark:block"
/>
</div>
</header>
<div className="max-w-[300px] w-full space-y-6 px-4">
<nav className="rounded-3xl border border-gray-200 p-6 dark:border-gray-700 space-y-4">
<p className="leading-6 text-gray-700 dark:text-gray-200 text-center">
What&apos;s next? {ass}
</p>
<ul>
{resources.map(({ href, text, icon }) => (
<li key={href}>
<a
className="group flex items-center gap-3 self-stretch p-3 leading-normal text-blue-700 hover:underline dark:text-blue-500"
href={href}
target="_blank"
rel="noreferrer"
>
{icon}
{text}
</a>
</li>
))}
</ul>
</nav>
</div>
</div>
</main>*/
);
}