-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: changed favico & added some libraries: nextui for ui, next-seo …
…for seo.
- Loading branch information
1 parent
b6c263b
commit 659724a
Showing
37 changed files
with
5,867 additions
and
852 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,79 @@ | ||
import React from "react"; | ||
import { | ||
Modal, | ||
ModalContent, | ||
ModalHeader, | ||
ModalBody, | ||
ModalFooter, | ||
Button, | ||
useDisclosure, | ||
} from "@nextui-org/react"; | ||
|
||
export default function App() { | ||
const { isOpen, onOpen, onClose } = useDisclosure(); | ||
const [backdrop, setBackdrop] = React.useState("opaque"); | ||
|
||
const backdrops = ["opaque", "blur", "transparent"]; | ||
|
||
const handleOpen = (backdrop) => { | ||
setBackdrop(backdrop); | ||
onOpen(); | ||
}; | ||
|
||
return ( | ||
<> | ||
<div className="flex flex-wrap gap-3"> | ||
{backdrops.map((b) => ( | ||
<Button | ||
key={b} | ||
variant="flat" | ||
color="warning" | ||
onPress={() => handleOpen(b)} | ||
className="capitalize" | ||
> | ||
{b} | ||
</Button> | ||
))} | ||
</div> | ||
<Modal backdrop={backdrop} isOpen={isOpen} onClose={onClose}> | ||
<ModalContent> | ||
{(onClose) => ( | ||
<> | ||
<ModalHeader className="flex flex-col gap-1"> | ||
Modal Title | ||
</ModalHeader> | ||
<ModalBody> | ||
<p> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. | ||
Nullam pulvinar risus non risus hendrerit venenatis. | ||
Pellentesque sit amet hendrerit risus, sed porttitor quam. | ||
</p> | ||
<p> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. | ||
Nullam pulvinar risus non risus hendrerit venenatis. | ||
Pellentesque sit amet hendrerit risus, sed porttitor quam. | ||
</p> | ||
<p> | ||
Magna exercitation reprehenderit magna aute tempor cupidatat | ||
consequat elit dolor adipisicing. Mollit dolor eiusmod sunt ex | ||
incididunt cillum quis. Velit duis sit officia eiusmod Lorem | ||
aliqua enim laboris do dolor eiusmod. Et mollit incididunt | ||
nisi consectetur esse laborum eiusmod pariatur proident Lorem | ||
eiusmod et. Culpa deserunt nostrud ad veniam. | ||
</p> | ||
</ModalBody> | ||
<ModalFooter> | ||
<Button color="danger" variant="light" onPress={onClose}> | ||
Close | ||
</Button> | ||
<Button color="primary" onPress={onClose}> | ||
Action | ||
</Button> | ||
</ModalFooter> | ||
</> | ||
)} | ||
</ModalContent> | ||
</Modal> | ||
</> | ||
); | ||
} |
This file was deleted.
Oops, something went wrong.
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,85 @@ | ||
import classes from "./region-modal.module.css"; | ||
import { useDispatch } from "react-redux"; | ||
import { | ||
updateRegionOpen, | ||
updateRegionValue, | ||
} from "@/store/slices/searchBarSlice"; | ||
import { useRef } from "react"; | ||
import { | ||
Modal, | ||
ModalBody, | ||
ModalContent, | ||
ModalHeader, | ||
useDisclosure, | ||
} from "@nextui-org/react"; | ||
|
||
const Dropdown = ({ items, searchBarState }) => { | ||
const { isOpen, onOpen, onOpenChange } = useDisclosure(); | ||
const dispatch = useDispatch(); | ||
const ref = useRef(null); | ||
|
||
const handleItemClick = (item) => { | ||
dispatch(updateRegionOpen(false)); | ||
dispatch(updateRegionValue(item)); | ||
}; | ||
|
||
return ( | ||
<div className={`${classes["dropdown"]}`} ref={ref}> | ||
{searchBarState.region.value && ( | ||
<div | ||
className={`${classes["dropdown-header"]} bg-accent w-12 sm:w-20 py-6 px-4`} | ||
onClick={onOpen} | ||
> | ||
<span className="font-bold text-white text-[14px] sm:text-[16px] "> | ||
{searchBarState.region.value?.labelShort} | ||
</span> | ||
</div> | ||
)} | ||
|
||
<Modal | ||
size="2xl" | ||
backdrop={"blur"} | ||
shadow="lg" | ||
isOpen={isOpen} | ||
onOpenChange={onOpenChange} | ||
classNames={{ | ||
body: "px-8 pb-8", | ||
header: "flex items-center justify-center text-black font-bold", | ||
backdrop: "backdrop-opacity-10 backdrop-blur", | ||
}} | ||
> | ||
<ModalContent> | ||
{(onClose) => ( | ||
<> | ||
<ModalHeader>Regions</ModalHeader> | ||
<ModalBody className="grid grid-cols-2 sm:grid-cols-4 gap-2 sm:gap-4"> | ||
{items.map((item) => ( | ||
<div | ||
className={classes["dropdown-item"]} | ||
onClick={(e) => { | ||
handleItemClick(item); | ||
onClose(); | ||
}} | ||
key={item.code} | ||
> | ||
<span | ||
className={`text-sm w-100 text-primary p-1 rounded-sm ${ | ||
item.code === searchBarState.region.value?.code | ||
? "bg-accent text-white font-medium" | ||
: "bg-transparent font-light hover:text-accent transition duration-50 ease-in-out" | ||
}`} | ||
> | ||
{item.labelLong} | ||
</span> | ||
</div> | ||
))} | ||
</ModalBody> | ||
</> | ||
)} | ||
</ModalContent> | ||
</Modal> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Dropdown; |
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.