-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OV-44: Add Not found page #58
Merged
Merged
Changes from 13 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
84fbcca
OV-44: + not found page
XCODE89 b6f8b5f
OV-44: * import corrections
XCODE89 b654f13
OV-44: * text color
XCODE89 e189927
OV-44: * organization
XCODE89 9e5955f
OV-44: * organization
XCODE89 7a1f22c
OV-44: * modularization
XCODE89 ff6a215
OV-44: * imports
XCODE89 a8c3835
OV-44: * imports
XCODE89 c2fae5d
Merge branch 'next' of https://github.com/BinaryStudioAcademy/bsa-202…
XCODE89 0631d15
OV-44: * Routes in an object
XCODE89 c807521
OV-44: * protectedROutes in common
XCODE89 f0dd5c3
OV-44: * animated404 in common folder
XCODE89 4721b92
OV-44: * conflicts resolved
XCODE89 8b743da
Merge branch 'task/OV-44-not-found-page' of https://github.com/Binary…
XCODE89 2ffc1ff
OV-44: * file name format
XCODE89 f3c7564
OV-44: * file name format
XCODE89 d7a87a9
OV-44: * merge with next
XCODE89 76023a2
OV-44: * resolved conflicts
XCODE89 4d234dc
Merge branch 'next' into task/OV-44-not-found-page
XCODE89 232c13b
OV-44: * conflicts resolved
XCODE89 e2bb626
OV-44: * updated with next
XCODE89 2ac0ed8
Merge branch 'next' into task/OV-44-not-found-page
XCODE89 46fd9d2
OV-44: * suggested changes
XCODE89 8ebb23b
OV-44: * formatted
XCODE89 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
62 changes: 62 additions & 0 deletions
62
frontend/src/bundles/common/components/animated404/animated404.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,62 @@ | ||
import { motion } from 'framer-motion'; | ||
|
||
import { | ||
CIRCLE_TRANSITION, | ||
CIRCLE_VARIANTS, | ||
} from './libs/constants/animation-config.js'; | ||
|
||
const Animated404: React.FC = () => ( | ||
<motion.svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
viewBox="0 0 200 82.7" | ||
width="500" | ||
height="400" | ||
aria-hidden="true" | ||
> | ||
<g> | ||
<text | ||
transform="matrix(1.2187 0 0 1 13 75.6393)" | ||
fill="white" | ||
fontSize="83" | ||
fontFamily="FootlightMTLight" | ||
aria-hidden="true" | ||
> | ||
4 | ||
</text> | ||
<text | ||
transform="matrix(1.2187 0 0 1 133 73.6393)" | ||
fill="white" | ||
fontSize="83" | ||
fontFamily="FootlightMTLight" | ||
aria-hidden="true" | ||
> | ||
4 | ||
</text> | ||
</g> | ||
<g> | ||
<motion.path | ||
d="M81.8,29.2c4.1-5.7,10.7-9.4,18.3-9.4c6.3,0,12.1,2.7,16.1,6.9c0.6-0.4,1.1-0.7,1.7-1.1 | ||
c-4.4-4.8-10.8-7.9-17.8-7.9c-8.3,0-15.6,4.2-20,10.6C80.7,28.5,81.3,28.8,81.8,29.2z" | ||
fill="white" | ||
aria-hidden="true" | ||
/> | ||
<motion.path | ||
d="M118.1,53.7c-4,5.7-10.7,9.5-18.2,9.5c-6.3,0-12.1-2.6-16.2-6.8c-0.6,0.4-1.1,0.7-1.7,1.1 | ||
c4.4,4.8,10.8,7.8,17.9,7.8c8.3,0,15.6-4.3,19.9-10.7C119.2,54.5,118.6,54.1,118.1,53.7z" | ||
fill="white" | ||
aria-hidden="true" | ||
/> | ||
<motion.circle | ||
cx="100" | ||
cy="41" | ||
r="1" | ||
fill="white" | ||
variants={CIRCLE_VARIANTS} | ||
animate="animate" | ||
transition={CIRCLE_TRANSITION} | ||
/> | ||
</g> | ||
</motion.svg> | ||
); | ||
|
||
export { Animated404 }; |
14 changes: 14 additions & 0 deletions
14
frontend/src/bundles/common/components/animated404/libs/constants/animation-config.ts
XCODE89 marked this conversation as resolved.
Show resolved
Hide resolved
|
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,14 @@ | ||
const CIRCLE_VARIANTS = { | ||
animate: { | ||
r: [1, 5, 10, 15, 20], | ||
opacity: [0.9, 0.3, 0.2, 0.1, 0], | ||
}, | ||
}; | ||
|
||
const CIRCLE_TRANSITION = { | ||
repeat: Number.POSITIVE_INFINITY, | ||
ease: 'easeOut', | ||
duration: 2, | ||
}; | ||
|
||
export { CIRCLE_TRANSITION, CIRCLE_VARIANTS }; |
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
14 changes: 14 additions & 0 deletions
14
frontend/src/bundles/common/components/protected-route/protected-route.tsx
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you did this in the other pull request so I guess this is not needed here |
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,14 @@ | ||
import { Navigate } from '~/bundles/common/components/components.js'; | ||
import { AppRoute } from '~/bundles/common/enums/enums.js'; | ||
|
||
interface Properties { | ||
children: React.ReactNode; | ||
} | ||
|
||
const ProtectedRoute: React.FC<Properties> = ({ children }) => { | ||
XCODE89 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
// TODO: When persistence is implemented, the user will be taken from the store. The following line is temporary | ||
const user = true; | ||
return user ? children : <Navigate to={AppRoute.SIGN_IN} replace />; | ||
}; | ||
|
||
export { ProtectedRoute }; |
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,22 @@ | ||
import { | ||
Box, | ||
Center, | ||
Heading, | ||
} from '~/bundles/common/components/components.js'; | ||
|
||
import { Animated404 } from '../../components/animated404/animated404.js'; | ||
|
||
const NotFound: React.FC = () => { | ||
return ( | ||
<Center height="100vh" bg="background.900"> | ||
<Box textAlign="center"> | ||
<Animated404 /> | ||
<Heading variant="H3" mt={4} as="span"> | ||
Page not found | ||
</Heading> | ||
</Box> | ||
</Center> | ||
); | ||
}; | ||
|
||
export { NotFound }; |
XCODE89 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
This file was deleted.
Oops, something went wrong.
XCODE89 marked this conversation as resolved.
Show resolved
Hide resolved
|
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.