@@ -10,7 +10,6 @@ import { useAboutMe, useRecommended } from "~/api/user";
1010import { Card } from "~/components/Card" ;
1111import { DraggableCard } from "~/components/DraggableCard" ;
1212import FullScreenCircularProgress from "~/components/common/FullScreenCircularProgress" ;
13- import { NavigateByAuthState } from "~/components/common/NavigateByAuthState" ;
1413import PersonDetailedMenu from "./components/PersonDetailedMenu" ;
1514
1615export default function Home ( ) {
@@ -84,60 +83,55 @@ export default function Home() {
8483 if ( error ) throw error ;
8584
8685 return (
87- < NavigateByAuthState type = "toLoginForUnauthenticated" >
88- < div className = "flex h-full flex-col items-center justify-center p-4" >
89- { displayedUser && (
90- < >
91- < div className = "flex h-full flex-col items-center justify-center" >
92- { nextUser && (
93- < div className = "relative h-full w-full" >
94- < div className = "-translate-x-4 -translate-y-4 inset-0 z-0 mt-4 transform" >
95- < Card displayedUser = { nextUser } currentUser = { currentUser } />
96- </ div >
97- < motion . div
98- animate = { controls }
99- className = "absolute inset-0 z-10 mt-4 flex items-center justify-center"
100- >
101- < DraggableCard
102- displayedUser = { displayedUser }
103- currentUser = { currentUser }
104- onSwipeLeft = { reject }
105- onSwipeRight = { accept }
106- clickedButton = { clickedButton }
107- />
108- </ motion . div >
86+ < div className = "flex h-full flex-col items-center justify-center p-4" >
87+ { displayedUser && (
88+ < >
89+ < div className = "flex h-full flex-col items-center justify-center" >
90+ { nextUser && (
91+ < div className = "relative h-full w-full" >
92+ < div className = "-translate-x-4 -translate-y-4 inset-0 z-0 mt-4 transform" >
93+ < Card displayedUser = { nextUser } currentUser = { currentUser } />
10994 </ div >
110- ) }
111- < button
112- type = "button"
113- onClick = { ( ) => setOpenDetailedMenu ( ! openDetailedMenu ) }
114- >
115- てすと
116- </ button >
117- < div className = "button-container mt-4 mb-4 flex w-full justify-center space-x-8" >
118- < CloseButton
119- onclick = { onClickClose }
120- icon = { < CloseIconStyled /> }
121- />
122- < GoodButton
123- onclick = { onClickHeart }
124- icon = { < FavoriteIconStyled /> }
125- />
95+ < motion . div
96+ animate = { controls }
97+ className = "absolute inset-0 z-10 mt-4 flex items-center justify-center"
98+ >
99+ < DraggableCard
100+ displayedUser = { displayedUser }
101+ currentUser = { currentUser }
102+ onSwipeLeft = { reject }
103+ onSwipeRight = { accept }
104+ clickedButton = { clickedButton }
105+ />
106+ </ motion . div >
126107 </ div >
127- </ div >
128- { openDetailedMenu && (
129- < PersonDetailedMenu
130- onClose = { ( ) => {
131- setOpenDetailedMenu ( false ) ;
132- } }
133- displayedUser = { displayedUser }
134- currentUser = { currentUser }
135- />
136108 ) }
137- </ >
138- ) }
139- </ div >
140- </ NavigateByAuthState >
109+ < button
110+ type = "button"
111+ onClick = { ( ) => setOpenDetailedMenu ( ! openDetailedMenu ) }
112+ >
113+ てすと
114+ </ button >
115+ < div className = "button-container mt-4 mb-4 flex w-full justify-center space-x-8" >
116+ < CloseButton onclick = { onClickClose } icon = { < CloseIconStyled /> } />
117+ < GoodButton
118+ onclick = { onClickHeart }
119+ icon = { < FavoriteIconStyled /> }
120+ />
121+ </ div >
122+ </ div >
123+ { openDetailedMenu && (
124+ < PersonDetailedMenu
125+ onClose = { ( ) => {
126+ setOpenDetailedMenu ( false ) ;
127+ } }
128+ displayedUser = { displayedUser }
129+ currentUser = { currentUser }
130+ />
131+ ) }
132+ </ >
133+ ) }
134+ </ div >
141135 ) ;
142136}
143137
0 commit comments