seperate component

This commit is contained in:
AykutSarac 2022-04-06 21:56:00 +03:00
parent 4fc1e53d6c
commit e7563b4035

View 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>
);
};