Skip to content

Commit db8301c

Browse files
authored
Merge pull request #698 from AppQuality/new-not-found
New not found
2 parents 906e8ed + 2a8d3ff commit db8301c

File tree

14 files changed

+1039
-99
lines changed

14 files changed

+1039
-99
lines changed

src/assets/not_found/404_desktop.svg

Lines changed: 177 additions & 0 deletions
Loading

src/assets/not_found/404_media_desktop.svg

Lines changed: 269 additions & 0 deletions
Loading

src/assets/not_found/404_media_mobile.svg

Lines changed: 202 additions & 0 deletions
Loading

src/assets/not_found/404_mobile.svg

Lines changed: 160 additions & 0 deletions
Loading

src/common/Pages.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ import CampaignPreview from 'src/pages/Campaign/preview';
1515
import Dashboard from 'src/pages/Dashboard';
1616
import Project from 'src/pages/Dashboard/Project';
1717
import LoginPage from 'src/pages/LoginPage';
18-
import NotFound from 'src/pages/NotFound';
18+
import NotFound from 'src/pages/NotFound/NotFound';
19+
import MediaNotFound from 'src/pages/NotFound/MediaNotFound';
1920
import Service from 'src/pages/Service';
2021
import Catalog from 'src/pages/Services';
2122
import Manual from 'src/pages/Manual';
@@ -72,6 +73,10 @@ const Pages = () => {
7273
element={<Service />}
7374
/>
7475
{/* No route found */}
76+
<Route
77+
path={`/${langPrefix}/media/oops`}
78+
element={<MediaNotFound />}
79+
/>
7580
<Route path={`/${langPrefix}/oops`} element={<NotFound />} />
7681
<Route index element={<Dashboard />} />
7782
</Route>

src/common/components/ErrorBoundary/ErrorBoundaryPage.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ const ErrorBoundaryPage = () => {
3535
</Paragraph>
3636

3737
<Paragraph style={{ marginTop: theme.space.lg }}>
38-
<Button isPrimary onClick={() => window.location.reload()}>
38+
<Button
39+
isPrimary
40+
isAccent
41+
onClick={() => window.location.reload()}
42+
>
3943
{t('__ERROR_PAGE_BUTTON')}
4044
</Button>
4145
</Paragraph>
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import { styled } from 'styled-components';
2+
3+
export const Container = styled.div<{
4+
excludeMarginTop?: boolean;
5+
excludeMarginBottom?: boolean;
6+
}>`
7+
/* Hide scrollbar for Chrome, Safari and Opera */
8+
::-webkit-scrollbar {
9+
display: none;
10+
}
11+
12+
/* Hide scrollbar for IE, Edge and Firefox */
13+
-ms-overflow-style: none; /* IE and Edge */
14+
scrollbar-width: none; /* Firefox */
15+
16+
-webkit-font-smoothing: antialiased;
17+
-moz-osx-font-smoothing: grayscale;
18+
background-color: ${({ theme }) => theme.palette.grey[100]};
19+
padding-bottom: ${({ theme }) =>
20+
theme.components.chrome.header
21+
.height}; /* Fix to prevent page bottom for being cut because of the chrome fixed header height */
22+
margin: ${({ theme }) => theme.space.xxl} auto;
23+
${({ excludeMarginTop }) => excludeMarginTop && `margin-top: 0;`}
24+
${({ excludeMarginBottom }) => excludeMarginBottom && `margin-bottom: 0;`}
25+
26+
@media (max-width: ${({ theme }) => theme.breakpoints.sm}) {
27+
margin: ${({ theme }) => theme.space.md} auto;
28+
${({ excludeMarginTop }) => excludeMarginTop && `margin-top: 0;`}
29+
${({ excludeMarginBottom }) => excludeMarginBottom && `margin-bottom: 0;`}
30+
}
31+
`;

src/features/templates/Page.tsx

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,8 @@
11
import React from 'react';
22
import { GoogleTagManager } from 'src/common/GoogleTagManager';
3-
import styled from 'styled-components';
43
import { Logged } from './Logged';
54
import ErrorBoundary from '../../common/components/ErrorBoundary';
6-
7-
const Container = styled.div<{
8-
excludeMarginTop?: boolean;
9-
excludeMarginBottom?: boolean;
10-
}>`
11-
/* Hide scrollbar for Chrome, Safari and Opera */
12-
::-webkit-scrollbar {
13-
display: none;
14-
}
15-
16-
/* Hide scrollbar for IE, Edge and Firefox */
17-
-ms-overflow-style: none; /* IE and Edge */
18-
scrollbar-width: none; /* Firefox */
19-
20-
-webkit-font-smoothing: antialiased;
21-
-moz-osx-font-smoothing: grayscale;
22-
background-color: ${({ theme }) => theme.palette.grey[100]};
23-
padding-bottom: ${({ theme }) =>
24-
theme.components.chrome.header
25-
.height}; /* Fix to prevent page bottom for being cut because of the chrome fixed header height */
26-
margin: ${({ theme }) => theme.space.xxl} auto;
27-
${({ excludeMarginTop }) => excludeMarginTop && `margin-top: 0;`}
28-
${({ excludeMarginBottom }) => excludeMarginBottom && `margin-bottom: 0;`}
29-
30-
@media (max-width: ${({ theme }) => theme.breakpoints.sm}) {
31-
margin: ${({ theme }) => theme.space.md} auto;
32-
${({ excludeMarginTop }) => excludeMarginTop && `margin-top: 0;`}
33-
${({ excludeMarginBottom }) => excludeMarginBottom && `margin-bottom: 0;`}
34-
}
35-
`;
5+
import { Container } from './Container';
366

377
export const Page = ({
388
children,

src/locales/en/translation.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"__404_PAGE_BUTTON": "Back to home",
3-
"__404_PAGE_DESCRIPTION": "The page are you looking for might be removed or is temporarily unavailable.",
4-
"__404_PAGE_SUB_TITLE MAX:80": "We couldn't find the page that you are looking for",
5-
"__404_PAGE_TITLE MAX:10": "Oops!",
3+
"__404_PAGE_DESCRIPTION": "Let’s find a better place for you to go.",
4+
"__404_PAGE_SUB_TITLE MAX:80": "This page could have been removed or it’s unavailable.",
5+
"__404_PAGE_TITLE MAX:10": "We guess this page is lost.",
66
"__APP_DAYS_LABEL_one": "day",
77
"__APP_DAYS_LABEL_many": "days",
88
"__APP_DAYS_LABEL_other": "days",
@@ -738,6 +738,10 @@
738738
"__LOGIN_FORM_PASSWORD_FORGOT_LABEL": "Forgot your password?",
739739
"__LOGIN_FORM_PASSWORD_PLACEHOLDER": "Insert your password",
740740
"__LOGIN_FORM_TITLE": "Log in to UNGUESS",
741+
"__MEDIA_404_PAGE_BUTTON": "Back to Home",
742+
"__MEDIA_404_PAGE_DESCRIPTION": "This page doesn’t exist or you need permission to view it.",
743+
"__MEDIA_404_PAGE_SUB_TITLE MAX:80": "You cannot access this page.",
744+
"__MEDIA_404_PAGE_TITLE MAX:10": "Hold up.",
741745
"__NOTIFICATION_CLOSE_TEXT": "Dismiss",
742746
"__NOTIFICATION_PROFILE_MODAL_COPY_EMAIL_MESSAGE": "Email address copied to clipboard",
743747
"__PAGE_BUG_EMPTY_STATE_CTA": "Try another search",

src/locales/it/translation.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"__404_PAGE_BUTTON": "Torna alla dashboard",
3-
"__404_PAGE_DESCRIPTION": "La pagina che stavi cercando potrebbe essere stata rimossa o temporaneamente non disponibile.",
4-
"__404_PAGE_SUB_TITLE MAX:80": "Non siamo riusciti a trovare la pagina che stavi cercando",
5-
"__404_PAGE_TITLE MAX:10": "Oops!",
2+
"__404_PAGE_BUTTON": "Torna alla Home",
3+
"__404_PAGE_DESCRIPTION": "La direzione giusta ora è solo una.",
4+
"__404_PAGE_SUB_TITLE MAX:80": "L’abbiamo cercata ovunque ma non è disponibile.",
5+
"__404_PAGE_TITLE MAX:10": "Non troviamo questa pagina.",
66
"__APP_DAYS_LABEL_one": "giorno",
77
"__APP_DAYS_LABEL_many": "giorni",
88
"__APP_DAYS_LABEL_other": "giorni",
@@ -760,6 +760,10 @@
760760
"__LOGIN_FORM_PASSWORD_FORGOT_LABEL": "Password dimenticata?",
761761
"__LOGIN_FORM_PASSWORD_PLACEHOLDER": "Inserisci password",
762762
"__LOGIN_FORM_TITLE": "Entra in UNGUESS",
763+
"__MEDIA_404_PAGE_BUTTON": "Back to Home",
764+
"__MEDIA_404_PAGE_DESCRIPTION": "This page doesn’t exist or you need permission to view it.",
765+
"__MEDIA_404_PAGE_SUB_TITLE MAX:80": "You cannot access this page.",
766+
"__MEDIA_404_PAGE_TITLE MAX:10": "Hold up.",
763767
"__NOTIFICATION_CLOSE_TEXT": "Chiudi",
764768
"__NOTIFICATION_PROFILE_MODAL_COPY_EMAIL_MESSAGE": "Hai copiato l’indirizzo email",
765769
"__PAGE_BUG_EMPTY_STATE_CTA": "Fai una nuova ricerca",

0 commit comments

Comments
 (0)