Skip to content

Commit

Permalink
removed comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Aamil13 committed Dec 22, 2024
1 parent 134ab85 commit 04a6637
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 97 deletions.
4 changes: 0 additions & 4 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ const withPWA = require("next-pwa")({

// Next.js configuration
const nextConfig = {
// Allow images from external domains
// images: {
// domains: ['cdn.pixabay.com', "res.cloudinary.com", "upload.wikimedia.org", 'www.servizisegreti.com',"saig.physics.ualberta.ca"],
// },

images: {
remotePatterns: [
Expand Down
93 changes: 0 additions & 93 deletions src/components/atoms/SelectDropdown/SelectDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,100 +25,7 @@ const motionStyle = {
exit: { opacity: 0, y: '-10%', transition: { duration: '0.35' } },
transition: { type: 'spring', stiffness: '100', duration: '0.75' },
}
// const SelectDropdown = ({ options, onChange, value, placeholder, icon, search = false, err, showIcon = false }: SelectDropdownProps) => {
// const [show, setShow] = useState(false)
// const dropdownRef = useRef<HTMLDivElement>(null)
// const [filteredOptions, setFilteredOptions] = useState(options)
// const searchRef = useRef<HTMLInputElement>(null)

// const handleSelect = (optionValue: string) => {
// onChange(optionValue)
// setShow(false)
// }

// const handleSearch = () => {
// const searchValue = searchRef.current?.value.toLowerCase() || ''
// setFilteredOptions(searchValue === '' ? options : options.filter((option: string) => option.toLowerCase().includes(searchValue)))
// }

// useEffect(() => {
// const handleClickOutside = (event: MouseEvent) => {
// if (dropdownRef.current && !dropdownRef.current.contains(event.target as Node)) {
// setShow(false)
// }
// }

// document.addEventListener('mousedown', handleClickOutside)

// return () => {
// document.removeEventListener('mousedown', handleClickOutside)
// }
// }, [])

// return (
// <motion.div ref={dropdownRef} className="relative">
// <div
// onClick={() => setShow(!show)}
// className={`${
// err ? 'border-red-400' : 'border-neutral-200'
// } flex justify-between items-center py-2 px-3 border focus:ring-2 rounded-lg drop-shadow-sm text-neutral-400 outline-none`}
// >
// <p className={`${value ? 'text-neutral-900' : 'text-neutral-400'} text-2xs`}> {value || placeholder}</p>
// <div>
// {icon == 'single' ? (
// <IoIosArrowDown />
// ) : (
// <div className="flex flex-col text-xs">
// <IoIosArrowUp />
// <IoIosArrowDown />
// </div>
// )}
// </div>
// </div>
// <AnimatePresence>
// {show && (
// <motion.div
// className={`flex flex-col custom-scrollbar ${
// !showIcon ? 'gap-2 w-full p-2' : 'gap-1 p-1'
// } absolute right-0 bg-white shadow-lg border border-neutral-200 rounded-lg z-10 max-h-52 w-52 overflow-y-auto`}
// {...motionStyle}
// >
// {search && (
// <input
// type="text"
// className="py-2 px-3 border focus:ring-2 rounded-lg drop-shadow-sm border-neutral-200 text-neutral-700 h-10 outline-none"
// ref={searchRef}
// placeholder="Search..."
// onChange={handleSearch}
// />
// )}
// {filteredOptions?.length > 0 ? (
// filteredOptions?.map((item: string, key: number) => {
// const IconComponent = icons[key % icons.length]
// return (
// <div
// className={`${
// key === 0 ? '' : 'border-t'
// } flex gap-2 items-center border-neutral-300 text-2xs text-neutral-900 p-1 cursor-pointer hover:bg-gray-200`}
// onClick={() => handleSelect(item)}
// key={key}
// >
// {showIcon && <IconComponent size={16} className="text-neutral-900" />}
// <p>{item}</p>
// </div>
// )
// })
// ) : (
// <p className="text-neutral-500 p-2">No results found</p>
// )}
// </motion.div>
// )}
// </AnimatePresence>
// </motion.div>
// )
// }

// export default SelectDropdown
const SelectDropdown = ({ options, onChange, value, placeholder, icon, search = false, err, showIcon = false }: SelectDropdownProps) => {
const [show, setShow] = useState(false)
const dropdownRef = useRef<HTMLDivElement>(null)
Expand Down

0 comments on commit 04a6637

Please sign in to comment.