-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from canopas/deploy-website-using-s3
Refactor UI
- Loading branch information
Showing
18 changed files
with
461 additions
and
293 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import Reels from "@/components/Reel"; | ||
import { useEffect } from "react"; | ||
|
||
const BottomSheet = ({ | ||
isOpen, | ||
onClose, | ||
name, | ||
items, | ||
}: { | ||
isOpen: boolean; | ||
onClose: any; | ||
name: string; | ||
items: any; | ||
}) => { | ||
useEffect(() => { | ||
if (isOpen) { | ||
document.body.classList.add("overflow-hidden"); | ||
} else { | ||
document.body.classList.remove("overflow-hidden"); | ||
} | ||
|
||
return () => { | ||
document.body.classList.remove("overflow-hidden"); | ||
}; | ||
}, [isOpen]); | ||
|
||
return ( | ||
<div | ||
className={`fixed inset-0 z-[100] flex items-end ${ | ||
isOpen ? "block" : "hidden" | ||
}`} | ||
> | ||
<div className="fixed inset-0" onClick={onClose}></div> | ||
<header className="select-none header left-0 top-0 z-40 w-full items-center absolute p-3 flex gap-2 text-white"> | ||
<button | ||
onClick={onClose} | ||
className="flex gap-2 items-center bg-primary bg-opacity-50 dark:bg-opacity-30 border-b border-primary dark:border-opacity-50 px-3 py-1 text-sm font-semibold rounded-lg" | ||
> | ||
<span>{"<"}</span> | ||
Back | ||
</button> | ||
<span>|</span> | ||
<p className="font-bold text-sm">{name} dishes</p> | ||
</header> | ||
<div className="h-full w-full bg-white dark:bg-black"> | ||
<Reels dishesData={items} isDishesLoading={false} /> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default BottomSheet; |
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,41 @@ | ||
import { ItemProps } from "@/types/card-item"; | ||
import Image from "next/image"; | ||
|
||
const SingleItem = ({ item }: { item: ItemProps }) => { | ||
const { name, description, image, video } = | ||
item; | ||
return ( | ||
<> | ||
<div | ||
className="wow fadeInUp relative flex h-full flex-col overflow-hidden rounded-xl bg-gradient-to-r from-white to-black shadow-one bg-cover" | ||
style={{ backgroundImage: `url(${image})` }} | ||
data-wow-delay=".1s" | ||
> | ||
<div className="relative block h-[25rem] w-full"> | ||
<Image | ||
src={image} | ||
alt="item-image" | ||
className="h-full w-full object-cover" | ||
height={100} | ||
width={100} | ||
loading="lazy" | ||
/> | ||
</div> | ||
<div | ||
className={`flex-auto bg-black bg-opacity-70 p-5 ${ | ||
video ? "z-[1]" : "" | ||
}`} | ||
> | ||
<div className="text-gray-200 dark:text-gray-300 text-center"> | ||
<p className="text-white mb-3 text-lg font-bold border-b border-gray-300 border-opacity-20"> | ||
{name} | ||
</p> | ||
<p className="text-xs">{description}</p> | ||
</div> | ||
</div> | ||
</div> | ||
</> | ||
); | ||
}; | ||
|
||
export default SingleItem; |
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.