-
Notifications
You must be signed in to change notification settings - Fork 74
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
1 parent
9563a1f
commit bf40d21
Showing
27 changed files
with
1,659 additions
and
1,224 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,50 @@ | ||
/* eslint-disable react/require-default-props */ | ||
import "./index.css"; | ||
|
||
import PropTypes from "prop-types"; | ||
import React from "react"; | ||
import {Link} from "react-router-dom"; | ||
|
||
import getText from "../../utils/get-text"; | ||
|
||
export default class DoesNotExist extends React.Component { | ||
render() { | ||
const {orgSlug, language, page} = this.props; | ||
return ( | ||
<React.Fragment> | ||
<div className="owisp-404-container"> | ||
<div className="owisp-404-row-1">Oops!</div> | ||
<div className="owisp-404-row-2">404 Not Found</div> | ||
<div className="owisp-404-row-1"> | ||
{page && page.heading ? getText(page.heading, language) : "Oops!"} | ||
</div> | ||
<div className="owisp-404-row-2"> | ||
{page && page.sub_heading | ||
? getText(page.sub_heading, language) | ||
: "404 Not Found"} | ||
</div> | ||
<div className="owisp-404-row-3"> | ||
Sorry, an error has occurred, Requested page not found! | ||
{page && page.message | ||
? getText(page.message, language) | ||
: "Sorry, an error has occurred, Requested page not found!"} | ||
</div> | ||
{page && page.homepage_link ? ( | ||
<div className="owisp-404-row-4"> | ||
<Link to={`/${orgSlug}`}> | ||
{getText(page.homepage_link.text, language)} | ||
</Link> | ||
</div> | ||
) : null} | ||
</div> | ||
</React.Fragment> | ||
); | ||
} | ||
} | ||
DoesNotExist.propTypes = { | ||
page: PropTypes.shape({ | ||
heading: PropTypes.object, | ||
sub_heading: PropTypes.object, | ||
message: PropTypes.object, | ||
homepage_link: PropTypes.object, | ||
}), | ||
language: PropTypes.string, | ||
orgSlug: PropTypes.string, | ||
}; |
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
Oops, something went wrong.