File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { ReactElement , ReactNode } from "react" ;
22import { motion } from 'framer-motion'
33import JournalLayout from "./journal/JournalLayout" ;
4+ import Button from "./common/Button" ;
5+ import { NavigateFunction , useNavigate } from "react-router-dom" ;
46
57type Props = {
68 children : ReactNode | ReactElement ;
79} ;
810
911const JournalBack = ( { children } : Props ) => {
12+ const navigate : NavigateFunction = useNavigate ( ) ;
1013
1114 return < >
12-
1315 < JournalLayout >
1416 < motion . div className = "col-start-2 col-end-3 row-start-2 row-end-3"
1517 initial = { { opacity : 0 } }
@@ -24,10 +26,17 @@ const JournalBack = ({ children }: Props) => {
2426 } }
2527 >
2628 < div className = 'basis-0 grow-[5] p-5' >
27- < div className = 'h-full flex flex-col justify-end items-end' >
28- < div className = "relative rounded shadow bg-cover-label p-5 flex basis-0 max-h-fit max-w-fit flex-col items-center justify-end" >
29+ < div className = 'relative h-full flex flex-col justify-end items-end' >
30+ < div className = "rounded shadow bg-cover-label p-5 flex basis-0 max-h-fit max-w-fit flex-col items-center justify-end" >
2931 { children }
3032 </ div >
33+ < Button
34+ styles = { "absolute -left-0 -bottom-0 bg-cover-dark text-cover-light rounded p-1" }
35+ handler = { ( ) => navigate ( '/' ) } >
36+ < svg xmlns = "http://www.w3.org/2000/svg" fill = "none" viewBox = "0 0 24 24" strokeWidth = { 1.2 } stroke = "currentColor" className = "w-6 h-6" >
37+ < path strokeLinecap = "round" strokeLinejoin = "round" d = "M15 15l6-6m0 0l-6-6m6 6H9a6 6 0 000 12h3" />
38+ </ svg >
39+ </ Button >
3140 </ div >
3241 </ div >
3342 < div className = 'bg-spine-pattern basis-0 grow-[1]'
Original file line number Diff line number Diff line change 11import { ReactElement , ReactNode } from "react" ;
22import { motion } from 'framer-motion'
33import JournalLayout from "./journal/JournalLayout" ;
4+ import Button from "./common/Button" ;
5+ import { NavigateFunction , useNavigate } from "react-router-dom" ;
46
57type Props = {
68 children : ReactNode | ReactElement ;
79} ;
810
911const JournalCover = ( { children } : Props ) => {
12+ const navigate : NavigateFunction = useNavigate ( ) ;
1013
1114 return < >
1215
@@ -36,6 +39,13 @@ const JournalCover = ({ children }: Props) => {
3639 </ div >
3740 < div className = "relative flex basis-0 grow-[2] flex-col items-center" >
3841 { children }
42+ < Button
43+ styles = { "absolute -right-0 -bottom-0 bg-cover-dark text-cover-light rounded p-1" }
44+ handler = { ( ) => navigate ( '/register' ) } >
45+ < svg xmlns = "http://www.w3.org/2000/svg" fill = "none" viewBox = "0 0 24 24" strokeWidth = { 1.2 } stroke = "currentColor" className = "w-6 h-6" >
46+ < path strokeLinecap = "round" strokeLinejoin = "round" d = "M9 15L3 9m0 0l6-6M3 9h12a6 6 0 010 12h-3" />
47+ </ svg >
48+ </ Button >
3949 </ div >
4050 </ div >
4151
Original file line number Diff line number Diff line change @@ -73,14 +73,6 @@ export default function Login() {
7373 type = { "submit" }
7474 > { isLoading ? < Spinner size = { 1 } ringColor = '#c29c75' spinColor = '#5c4d3b' > </ Spinner > : "Login" } </ Button >
7575 </ form >
76-
77- < Button
78- styles = { "absolute -right-0 -bottom-0 bg-cover-dark text-cover-light rounded p-1" }
79- handler = { ( ) => navigate ( '/register' ) } >
80- < svg xmlns = "http://www.w3.org/2000/svg" fill = "none" viewBox = "0 0 24 24" strokeWidth = { 1.2 } stroke = "currentColor" className = "w-6 h-6" >
81- < path strokeLinecap = "round" strokeLinejoin = "round" d = "M9 15L3 9m0 0l6-6M3 9h12a6 6 0 010 12h-3" />
82- </ svg >
83- </ Button >
8476 </ JournalCover >
8577 </ >
8678}
Original file line number Diff line number Diff line change @@ -63,14 +63,6 @@ export default function Register() {
6363 type = { "submit" }
6464 > { isLoading ? < Spinner size = { 1 } ringColor = '#c29c75' spinColor = '#5c4d3b' /> : "Create" } </ Button >
6565 </ form >
66- < Button
67- styles = { "absolute -left-28 -bottom-0 bg-cover-dark text-cover-light rounded p-1" }
68- handler = { ( ) => navigate ( '/' ) } >
69- < svg xmlns = "http://www.w3.org/2000/svg" fill = "none" viewBox = "0 0 24 24" strokeWidth = { 1.2 } stroke = "currentColor" className = "w-6 h-6" >
70- < path strokeLinecap = "round" strokeLinejoin = "round" d = "M15 15l6-6m0 0l-6-6m6 6H9a6 6 0 000 12h3" />
71- </ svg >
72-
73- </ Button >
7466 </ JournalBack >
7567 </ >
7668}
You can’t perform that action at this time.
0 commit comments