mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-05-07 01:02:36 +00:00
chore: restructure project into yarn workspaces, remove next
This commit is contained in:
parent
49e308507e
commit
8d06327c03
266 changed files with 16466 additions and 3350 deletions
29
packages/design-system/templates/errors/Errors.tsx
Normal file
29
packages/design-system/templates/errors/Errors.tsx
Normal file
|
@ -0,0 +1,29 @@
|
|||
import { DotOverlay } from '@roleypoly/design-system/atoms/dot-overlay';
|
||||
import { Hero } from '@roleypoly/design-system/atoms/hero';
|
||||
import {
|
||||
ErrorBanner,
|
||||
ErrorMessage,
|
||||
} from '@roleypoly/design-system/molecules/error-banner';
|
||||
import { AppShell } from '@roleypoly/design-system/organisms/app-shell';
|
||||
import * as React from 'react';
|
||||
import { DiscordUser } from '../../../../src/common/types';
|
||||
import { getMessageFromCode } from './errorStrings';
|
||||
|
||||
export type ErrorProps = {
|
||||
code: string | number;
|
||||
messageOverride?: ErrorMessage;
|
||||
user?: DiscordUser | null;
|
||||
};
|
||||
|
||||
export const Error = (props: ErrorProps) => {
|
||||
const messageFromCode = getMessageFromCode(props.code);
|
||||
|
||||
return (
|
||||
<AppShell user={props.user || undefined}>
|
||||
<DotOverlay />
|
||||
<Hero topSpacing={100} bottomSpacing={25}>
|
||||
<ErrorBanner message={messageFromCode} />
|
||||
</Hero>
|
||||
</AppShell>
|
||||
);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue