-
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add project not found page (#1762)
* feat(images): no-file image add * fix(store): projectNotFound slice and type add * feat(projectNotFound): project not found component display if api throw 404 * fix(mainView): show projectNotFound page if state is true * fix(api): show project not found page if api throws 404 * fix(submissionInstancePage): update submission instance page route
- Loading branch information
Showing
9 changed files
with
81 additions
and
21 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
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
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,33 @@ | ||
import React from 'react'; | ||
import NoFileImage from '@/assets/images/no-file.png'; | ||
import Button from '@/components/common/Button'; | ||
import { useNavigate } from 'react-router-dom'; | ||
|
||
const ProjectNotFound = () => { | ||
const navigate = useNavigate(); | ||
return ( | ||
<div className="md:fmtm-px-[2rem] lg:fmtm-px-[4.5rem] fmtm-h-full"> | ||
<div className="fmtm-flex fmtm-flex-col fmtm-items-center fmtm-h-[90%] fmtm-justify-center"> | ||
<div className="fmtm-mb-[5rem]"> | ||
<img src={NoFileImage} alt="Project Not Found Photo" className="fmtm-w-[12rem] lg:fmtm-w-[15.625rem]" /> | ||
</div> | ||
<div className="fmtm-flex fmtm-flex-col fmtm-gap-3"> | ||
<h2 className="fmtm-text-[1.5rem] md:fmtm-text-[2rem] lg:fmtm-text-[2.5rem] fmtm-text-primaryRed fmtm-font-barlow fmtm-font-bold fmtm-text-center"> | ||
PROJECT NOT FOUND | ||
</h2> | ||
<p className="fmtm-text-sm sm:fmtm-text-base fmtm-text-center fmtm-text-[#68707F]"> | ||
There is no project to show, please create a project by clicking the button below.{' '} | ||
</p> | ||
</div> | ||
<Button | ||
btnText="Create Project" | ||
onClick={() => navigate('/create-project')} | ||
btnType="primary" | ||
className="fmtm-mx-auto fmtm-rounded-none fmtm-py-2 fmtm-mt-8" | ||
/> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default ProjectNotFound; |