mirror of
https://github.com/AnimeThemes/animethemes-web.git
synced 2026-07-11 01:24:31 +02:00
1f0844465c
* Added "Share" and "Add to Playlist" buttons to video player overlay. * Added options to sort playlists in reverse order. * Added handle for dragging playlist items. * Added consistent import sorting (with ESLint). * Removed barrel files.
44 lines
1.2 KiB
TypeScript
44 lines
1.2 KiB
TypeScript
import styled from "styled-components";
|
|
|
|
import { faExclamation } from "@fortawesome/pro-solid-svg-icons";
|
|
|
|
import { Row } from "@/components/box/Flex";
|
|
import { Card } from "@/components/card/Card";
|
|
import { Icon } from "@/components/icon/Icon";
|
|
import { Text } from "@/components/text/Text";
|
|
import theme from "@/theme";
|
|
|
|
const StyledCard = styled(Card)`
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 16px;
|
|
`;
|
|
|
|
const StyledErrorMessage = styled(Text).attrs({ variant: "code" })`
|
|
display: block;
|
|
background-color: ${theme.colors["solid-on-card"]};
|
|
overflow: auto;
|
|
`;
|
|
|
|
interface ErrorCardProps {
|
|
error: unknown
|
|
}
|
|
|
|
export function ErrorCard({ error }: ErrorCardProps) {
|
|
return (
|
|
<StyledCard color="text-warning">
|
|
<Row style={{ "--gap": "1rem" }}>
|
|
<Text color="text-warning">
|
|
<Icon icon={faExclamation}/>
|
|
</Text>
|
|
<Text block>An error occurred while searching! Help improving the site by sending us the following error message:</Text>
|
|
</Row>
|
|
<pre>
|
|
<StyledErrorMessage>
|
|
{JSON.stringify(error, null, 2)}
|
|
</StyledErrorMessage>
|
|
</pre>
|
|
</StyledCard>
|
|
);
|
|
}
|