-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '23-티켓팅-기능-개발' into dev
- Loading branch information
Showing
16 changed files
with
511 additions
and
74 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
import Ticket from '@/components/my-tickets/ticket'; | ||
|
||
export default function Detail({ params: { id } }: { params: { id: number } }) { | ||
return <div>Detail {id}</div>; | ||
return ( | ||
<section className='flex flex-col px-5 pt-5 w-full h-[calc(100dvh-100px)] bg-primary items-center'> | ||
<Ticket ticketId={id} /> | ||
</section> | ||
); | ||
} |
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,48 @@ | ||
import { useFormatter, useTranslations } from 'next-intl'; | ||
import Image from 'next/image'; | ||
import { FiCalendar, FiClock, FiHeart } from 'react-icons/fi'; | ||
|
||
export type TileProps = { | ||
src: string; | ||
alt: string; | ||
artistName: string; | ||
}; | ||
|
||
export default function Tile({ src, alt, artistName }: TileProps) { | ||
const format = useFormatter(); | ||
const t = useTranslations('Carousel'); | ||
|
||
return ( | ||
<div className='flex-[0_0_100%] aspect-[3/4] bg-neutral-500 rounded-2xl overflow-hidden relative'> | ||
<Image | ||
src={src} | ||
alt={alt} | ||
className='absolute left-0 right-0 top-0 bottom-0 object-cover' | ||
placeholder='blur' | ||
quality={100} | ||
blurDataURL='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAFklEQVR42mN8//HLfwYiAOOoQvoqBABbWyZJf74GZgAAAABJRU5ErkJggg==' | ||
fill | ||
/> | ||
<div className='absolute p-4 flex flex-col justify-between h-1/3 left-4 right-4 bottom-4 bg-neutral-700 rounded-2xl bg-clip-padding backdrop-filter backdrop-blur-xl bg-opacity-0 text-white shadow-lg'> | ||
<span className='text-xs flex gap-2 items-center'> | ||
<FiHeart color='white' /> | ||
{t('nextup')} | ||
</span> | ||
<div> | ||
<h4 className='font-bold text-2xl'>{artistName}</h4> | ||
<span className='text-sm'>Coldplay</span> | ||
</div> | ||
<div className='text-sm flex gap-4 font-normal'> | ||
<span className='flex gap-2 items-center justify-center'> | ||
<FiCalendar color='white' /> | ||
{format.dateTime(new Date('2024-03-09T10:36:01.516Z'), 'short')} | ||
</span> | ||
<span className='flex gap-2 items-center justify-center'> | ||
<FiClock color='white' /> | ||
19:00 | ||
</span> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} |
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,62 @@ | ||
'use client'; | ||
|
||
import { default as NextLink } from 'next/link'; | ||
import { useRouter } from 'next/navigation'; | ||
import If from '../util/if'; | ||
import { cn } from '@/lib/utils'; | ||
import { useAuth } from '@/hooks'; | ||
import { toast } from 'sonner'; | ||
import { motion } from 'framer-motion'; | ||
|
||
type Props = { | ||
children: React.ReactNode; | ||
href?: string; | ||
className?: string; | ||
back?: boolean; | ||
auth?: boolean; | ||
}; | ||
|
||
export default function Link({ | ||
children, | ||
href, | ||
className, | ||
back = false, | ||
auth = false, | ||
}: Props) { | ||
const router = useRouter(); | ||
const { isLoggedIn } = useAuth(); | ||
|
||
const checkAuth = () => { | ||
if (!isLoggedIn) { | ||
requestAnimationFrame(() => { | ||
toast.error('로그인이 필요합니다.'); | ||
}); | ||
router.push('/login'); | ||
} | ||
}; | ||
|
||
return ( | ||
<motion.div whileTap={{ scale: 0.98 }} className={className}> | ||
<If condition={back}> | ||
<If.Then> | ||
<button onClick={() => router.back()} className='w-full h-full'> | ||
{children} | ||
</button> | ||
</If.Then> | ||
<If.Else> | ||
<NextLink | ||
href={href ?? '/'} | ||
className='w-full h-full' | ||
onClick={() => { | ||
if (auth) { | ||
checkAuth(); | ||
} | ||
}} | ||
> | ||
{children} | ||
</NextLink> | ||
</If.Else> | ||
</If> | ||
</motion.div> | ||
); | ||
} |
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
Oops, something went wrong.