mirror of
https://github.com/AykutSarac/jsoncrack.com.git
synced 2025-01-27 15:22:56 +08:00
seperate component
This commit is contained in:
parent
4fc1e53d6c
commit
e7563b4035
46
src/containers/Incompatible/index.tsx
Normal file
46
src/containers/Incompatible/index.tsx
Normal file
@ -0,0 +1,46 @@
|
||||
import { useRouter } from "next/router";
|
||||
import React from "react";
|
||||
import { Button } from "src/components/Button";
|
||||
import styled from "styled-components";
|
||||
|
||||
export const StyledIncompatible = styled.div`
|
||||
display: none;
|
||||
|
||||
@media only screen and (max-width: 568px) {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: ${({ theme }) => theme.BLACK_LIGHT};
|
||||
color: ${({ theme }) => theme.SILVER};
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
button {
|
||||
margin-top: 60px;
|
||||
}
|
||||
|
||||
&::before {
|
||||
content: "Uh, oh!";
|
||||
font-weight: 700;
|
||||
font-size: 60px;
|
||||
opacity: 0.6;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const Incompatible: React.FC = () => {
|
||||
const route = useRouter();
|
||||
|
||||
return (
|
||||
<StyledIncompatible>
|
||||
This app is not compatible with your device!
|
||||
<Button className="incompatible" onClick={() => route.push("/")}>
|
||||
Go Back
|
||||
</Button>
|
||||
</StyledIncompatible>
|
||||
);
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user