1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-10-28 14:45:52 -04:00

more optimization/error handling

This commit is contained in:
2022-04-22 09:18:53 -04:00
parent 831139c132
commit 8a97b706be
12 changed files with 93 additions and 72 deletions

View File

@@ -1,6 +1,8 @@
import { useEffect, useState } from "react";
import { ErrorBoundary } from "react-error-boundary";
import dynamic from "next/dynamic";
import { NextSeo } from "next-seo";
import Terminal from "../components/Terminal";
import { styled } from "../lib/styles/stitches.config";
// obviously, an interactive VNC display will not work even a little bit server-side
@@ -56,7 +58,11 @@ const Y2K = () => {
/>
<Wallpaper style={{ backgroundImage: wallpaperUrl ? `url(${wallpaperUrl})` : "" }}>
<VNC server={SOCKET_PROXY} />
<ErrorBoundary
fallback={<Terminal>Oh dear, it looks like something's gone VERY wrong. Sorry about that!</Terminal>}
>
<VNC server={SOCKET_PROXY} />
</ErrorBoundary>
</Wallpaper>
</>
);