Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NotFoundImage: Removed useless code (<Image />) #32

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 33 additions & 21 deletions components/NotFoundImage/NotFoundImage.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
import { createStyles, Image, Container, Title, Text, Button, SimpleGrid } from '@mantine/core';
import image from './image.svg';
import {
Button,
Container,
createStyles,
Image,
SimpleGrid,
Text,
Title,
} from "@mantine/core";
import image from "./image.svg";

const useStyles = createStyles((theme) => ({
const useStyles = createStyles(theme => ({
root: {
paddingTop: 80,
paddingBottom: 80,
Expand All @@ -13,26 +21,22 @@ const useStyles = createStyles((theme) => ({
marginBottom: theme.spacing.md,
fontFamily: `Greycliff CF, ${theme.fontFamily}`,

[theme.fn.smallerThan('sm')]: {
[theme.fn.smallerThan("sm")]: {
fontSize: 32,
},
},

control: {
[theme.fn.smallerThan('sm')]: {
width: '100%',
[theme.fn.smallerThan("sm")]: {
width: "100%",
},
},

mobileImage: {
[theme.fn.largerThan('sm')]: {
display: 'none',
},
},

desktopImage: {
[theme.fn.smallerThan('sm')]: {
display: 'none',
container404: {
display: "flex",
flexDirection: "row-reverse",
[theme.fn.smallerThan("sm")]: {
flexDirection: "column",
},
},
}));
Expand All @@ -42,19 +46,27 @@ export function NotFoundImage() {

return (
<Container className={classes.root}>
<SimpleGrid spacing={80} cols={2} breakpoints={[{ maxWidth: 'sm', cols: 1, spacing: 40 }]}>
<Image src={image} className={classes.mobileImage} />
<SimpleGrid
spacing={80}
cols={2}
breakpoints={[{ maxWidth: "sm", cols: 1, spacing: 40 }]}
className={classes.container404}>
<Image src={image.src} />
<div>
<Title className={classes.title}>Something is not right...</Title>
<Text color="dimmed" size="lg">
Page you are trying to open does not exist. You may have mistyped the address, or the
page has been moved to another URL. If you think this is an error contact support.
Page you are trying to open does not exist. You may have mistyped
the address, or the page has been moved to another URL. If you think
this is an error contact support.
</Text>
<Button variant="outline" size="md" mt="xl" className={classes.control}>
<Button
variant="outline"
size="md"
mt="xl"
className={classes.control}>
Get back to home page
</Button>
</div>
<Image src={image.src} className={classes.desktopImage} />
</SimpleGrid>
</Container>
);
Expand Down