diff --git a/apps/tax/components/Error/CustomError/CustomError.tsx b/apps/tax/components/Error/CustomError/CustomError.tsx new file mode 100644 index 00000000..b48d69eb --- /dev/null +++ b/apps/tax/components/Error/CustomError/CustomError.tsx @@ -0,0 +1,46 @@ +import { + GridContainer, + GridRow, + GridColumn, + Box, + Text, +} from '@island.is/island-ui/core' +import { ReactNode } from 'react' + +interface CustomErrorProps { + statusCode: number + title: string + children: ReactNode +} + +const CustomError = ({ statusCode, title, children }: CustomErrorProps) => { + return ( + + + + + + {statusCode} + + + {title} + + {children} + + + + + ) +} + +export default CustomError diff --git a/apps/tax/components/Error/Error404/Error404.json b/apps/tax/components/Error/Error404/Error404.json new file mode 100644 index 00000000..14d72ba0 --- /dev/null +++ b/apps/tax/components/Error/Error404/Error404.json @@ -0,0 +1,15 @@ +{ + "Error404": { + "title": "Afsakið hlé.", + "notFoundText": "Síða eða skjal fannst ekki.", + "text": "Eftirfarandi ástæður geta verið fyrir því að síða/skjal fannst ekki", + "bulletOne": "Upplýsingar hafa verið fjarlægðar", + "bulletTwo": "Vefslóð er ekki rétt skrifuð", + "bulletThree": "Síðan er ekki lengur til", + "bulletFour": "Villa er á síðunni", + "textAfterBullets": "Þú getur einnig prófað að leita að efninu á forsíðu", + "linkText": "samráðsgáttarinnar", + "textAfterBreak": "Teljir þú að síða eða skjal eigi sannarlega að birtast má endilega senda ábendingu á netfangið ", + "email": "samradsgatt@stjornarradid.is" + } +} diff --git a/apps/tax/components/Error/Error404/Error404.tsx b/apps/tax/components/Error/Error404/Error404.tsx new file mode 100644 index 00000000..332295ae --- /dev/null +++ b/apps/tax/components/Error/Error404/Error404.tsx @@ -0,0 +1,37 @@ +import {Bullet, BulletList, LinkV2, Text} from '@island.is/island-ui/core' +import Link from 'next/link' +import localization from './Error404.json' +import {CustomError} from "@island.is/tax/components/Error"; +import Layout from "@island.is/tax/layouts/main"; + +export const Error404 = () => { + const loc = localization.Error404 + return ( + + + {loc.notFoundText} + +
+ {`${loc.text}:`} + + {loc.bulletOne} + {loc.bulletTwo} + {loc.bulletThree} + {loc.bulletFour} + {' '} + + {loc.textAfterBullets} + + {loc.linkText} + +
+ {loc.textAfterBreak} + + {loc.email} + +
+
+
+ ) +} +export default Error404 diff --git a/apps/tax/components/Error/Error500/Error500.json b/apps/tax/components/Error/Error500/Error500.json new file mode 100644 index 00000000..ec7757be --- /dev/null +++ b/apps/tax/components/Error/Error500/Error500.json @@ -0,0 +1,6 @@ +{ + "Error500": { + "title": "Afsakið hlé", + "text": "Eitthvað fór úrskeiðis. Villan hefur verið skráð og unnið verður að viðgerð eins fljótt og auðið er." + } +} diff --git a/apps/tax/components/Error/Error500/Error500.tsx b/apps/tax/components/Error/Error500/Error500.tsx new file mode 100644 index 00000000..4be597a1 --- /dev/null +++ b/apps/tax/components/Error/Error500/Error500.tsx @@ -0,0 +1,13 @@ +import { Text } from '@island.is/island-ui/core' +import localization from './Error500.json' +import {CustomError} from "@island.is/tax/components/Error"; + +export const Error500 = () => { + const loc = localization.Error500 + return ( + + {loc.text} + + ) +} +export default Error500 diff --git a/apps/tax/components/Error/index.ts b/apps/tax/components/Error/index.ts new file mode 100644 index 00000000..cf68b476 --- /dev/null +++ b/apps/tax/components/Error/index.ts @@ -0,0 +1,3 @@ +export { default as Error404 } from './Error404/Error404' +export { default as Error500 } from './Error500/Error500' +export { default as CustomError } from './CustomError/CustomError' diff --git a/apps/tax/pages/404.tsx b/apps/tax/pages/404.tsx new file mode 100644 index 00000000..1a7e8496 --- /dev/null +++ b/apps/tax/pages/404.tsx @@ -0,0 +1,8 @@ +import {Error404} from "@island.is/tax/components/Error"; + + +export const Index = () => { + return +} + +export default Index