feat: added favorites page
This commit is contained in:
1 parent
0cb860d0a0
commit
89e76f5df6
27 files changed
+412
-116
No files matched your search
@@ -1,6 +1,6 @@
|
||||
'use client';
|
||||
|
||||
import { RefreshCcwDot } from 'lucide-react';
|
||||
import { ArrowLeft, ArrowRight } from 'lucide-react';
|
||||
|
||||
import Movie from '@/components/Movie/Preview';
|
||||
import { Button } from '@/components/ui/button';
|
||||
@@ -8,14 +8,21 @@ import { Button } from '@/components/ui/button';
|
||||
import useRandomMovie from './useRandomMovie';
|
||||
|
||||
export default function Container() {
|
||||
const { movie, next } = useRandomMovie();
|
||||
const { movie, next, previous, hasPrevious } = useRandomMovie();
|
||||
|
||||
return (
|
||||
<>
|
||||
<Button className='w-full mb-2 p-2' onClick={next} title='Next movie'>
|
||||
<RefreshCcwDot size={24} strokeWidth={1} />
|
||||
</Button>
|
||||
<Movie movie={movie} />
|
||||
<div className='gap-2 flex'>
|
||||
<Button className='mb-2 p-2' onClick={previous} disabled={!hasPrevious} title='Previous movie'>
|
||||
<ArrowLeft size={24} strokeWidth={1} />
|
||||
</Button>
|
||||
<Button className='w-full mb-2 p-2 grow' onClick={next} title='Next movie'>
|
||||
<ArrowRight size={24} strokeWidth={1} />
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<Movie key={movie?.id} movie={movie} />
|
||||
<div className='w-full h-2' />
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user