-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
53 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
6 changes: 3 additions & 3 deletions
6
...components/notFound/NotFoundPage.test.tsx → ...oNotFoundPage/StudioNotFoundPage.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
frontend/libs/studio-components/src/components/StudioNotFoundPage/StudioNotFoundPage.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import React, { HTMLAttributes, forwardRef } from 'react'; | ||
import classes from './StudioNotFoundPage.module.css'; | ||
import cn from 'classnames'; | ||
import { Heading, Paragraph, Link } from '@digdir/design-system-react'; | ||
import { Trans, useTranslation } from 'react-i18next'; | ||
|
||
type StudioNotFoundPageProps = HTMLAttributes<HTMLDivElement>; | ||
|
||
/** | ||
* @component | ||
* Displays the 404 - Not found page in studio | ||
*/ | ||
export const StudioNotFoundPage = forwardRef<HTMLDivElement, StudioNotFoundPageProps>( | ||
({ className, ...rest }, ref) => { | ||
const { t } = useTranslation(); | ||
|
||
return ( | ||
<div ref={ref} className={cn(className, classes.wrapper)} {...rest}> | ||
<div className={classes.contentWrapper}> | ||
<img src={require('./images/PCImage404.png')} alt='' /> | ||
<div className={classes.textWrapper}> | ||
<Heading level={1} size='large'> | ||
{t('not_found_page.heading')} | ||
</Heading> | ||
<Paragraph size='small' className={classes.paragraph}> | ||
<Trans i18nKey='not_found_page.text'> | ||
<Link href='mailto:[email protected]'>[email protected]</Link> | ||
</Trans> | ||
</Paragraph> | ||
<Link href='/' size='small' className={classes.link}> | ||
{t('not_found_page.redirect_to_dashboard')} | ||
</Link> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}, | ||
); | ||
|
||
StudioNotFoundPage.displayName = 'StudioNotFoundPage'; |
File renamed without changes
File renamed without changes
1 change: 1 addition & 0 deletions
1
frontend/libs/studio-components/src/components/StudioNotFoundPage/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { StudioNotFoundPage } from './StudioNotFoundPage'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 0 additions & 32 deletions
32
frontend/packages/shared/src/components/notFound/NotFoundPage.tsx
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters