-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2685 from OneCommunityGlobal/Peterson_implement_D…
…efault_Error_Page_to_be_created_and_redirected_to Peterson implement default error page to be created and redirected to
- Loading branch information
Showing
9 changed files
with
145 additions
and
10 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
* { | ||
padding: 0; | ||
margin: 0; | ||
box-sizing: border-box; | ||
} | ||
|
||
.backgroungContainer { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100vh; | ||
} | ||
|
||
.container { | ||
width: 80%; | ||
height: auto; | ||
} | ||
|
||
.container img { | ||
max-width: 100%; | ||
width: 100%; | ||
height: 25rem; | ||
display: block; | ||
/* 35 */ | ||
object-fit: contain; | ||
} | ||
|
||
.container p { | ||
font-size: 22px; | ||
position: relative; | ||
top: -100px; | ||
left: 20px; | ||
} | ||
|
||
@media (max-width: 600px) { | ||
.container img { | ||
width: 100%; | ||
height: 15rem; | ||
display: block; | ||
object-fit: cover; | ||
} | ||
.container p { | ||
font-size: 15px; | ||
position: relative; | ||
top: -20px; | ||
left: 20px; | ||
} | ||
} | ||
|
||
@media (max-width: 400px) { | ||
.container img { | ||
width: 100%; | ||
height: 15rem; | ||
display: block; | ||
object-fit: contain; | ||
} | ||
} |
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,57 @@ | ||
import { Link } from 'react-router-dom'; | ||
import { useSelector } from 'react-redux'; | ||
import './notFoundPage.css'; | ||
|
||
function NotFoundPage() { | ||
const darkMode = useSelector(state => state.theme.darkMode); | ||
const validateUserLogin = localStorage.getItem('token'); | ||
|
||
return ( | ||
<section | ||
// eslint-disable-next-line react/jsx-curly-brace-presence | ||
// d-flex align-items-center flex-column justify-content-center | ||
className={`h-100 `} | ||
style={{ backgroundColor: darkMode ? '#121212' : 'white' }} | ||
> | ||
<div className="backgroungContainer"> | ||
<div className="container"> | ||
<img | ||
src={`${darkMode ? '/imagePage404DarkMode.png' : 'imagePage404.png'}`} | ||
alt="404 error page illustration" | ||
/> | ||
{validateUserLogin ? ( | ||
<p | ||
style={{ marginBottom: '50px' }} | ||
className={`${darkMode ? 'text-light' : 'text-dark '}`} | ||
> | ||
The rabbits have been nibbling the cables again... Maybe this will help | ||
<Link style={{ marginLeft: '6px' }} to="/dashboard"> | ||
home | ||
</Link>{' '} | ||
or you can report this page by clicking | ||
<Link style={{ marginLeft: '6px' }} to="/dashboard?openModalReport"> | ||
here | ||
</Link> | ||
</p> | ||
) : ( | ||
// eslint-disable-next-line react/jsx-curly-brace-presence | ||
<p | ||
style={{}} | ||
className={`${ | ||
darkMode ? 'text-light message-error-404DarkMode ' : 'text-dark message-error-404' | ||
}`} | ||
> | ||
It seems like you've reached a page that doesn't exist. In addition | ||
You're not currently logged in. Please go back to the | ||
<Link style={{ marginLeft: '8px' }} to="/login"> | ||
login page | ||
</Link> | ||
</p> | ||
)} | ||
</div> | ||
</div> | ||
</section> | ||
); | ||
} | ||
|
||
export default NotFoundPage; |
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