Skip to content

Commit

Permalink
Merge pull request #110 from 25Pi25/master
Browse files Browse the repository at this point in the history
Update error page display
  • Loading branch information
25Pi25 authored Feb 20, 2025
2 parents 41eef92 + 7ce3afc commit 6d84834
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/ErrorPage.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { Box, Typography, Link } from '@mui/material';

export default function ErrorPage() {
return <Box textAlign='center' alignItems='center'>
return <Box textAlign='center' alignItems='center' sx={{ background: "rgba(255,255,255,0.8)" }}>
<h1>Uh Oh!</h1>
<Typography>
Looks like the server ran into an error. This typically happens when our sprite server is down, and we'll try to get it back up as soon as possible.
</Typography>
<Typography>
If this problem still occurs, check server uptime at <Link href="https://status.pmdcollab.org/">PMDCollab Status</Link>.
If this problem still occurs, check <Link href="https://discord.gg/skytemple">our discord</Link> for updates.
</Typography>
</Box>
}
11 changes: 9 additions & 2 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,17 @@ async function initialize() {
const { data } = await client.query({
query: KeysDocument
}).catch(() => ({})) as KeysQueryResult;

const root = ReactDOM.createRoot(document.getElementById("root")!);
if (!data) {
root.render(<ErrorPage />);
root.render(
<React.StrictMode>
<ThemeProvider theme={defaultTheme}>
<CssBaseline>
<ErrorPage />
</CssBaseline>
</ThemeProvider>
</React.StrictMode>);
return;
}
const sortedMonsters = [...data.monster].sort((a, b) => a.id - b.id)
Expand Down

0 comments on commit 6d84834

Please sign in to comment.