edit layout for small resolution screens
This commit is contained in:
@@ -44,9 +44,13 @@ export default function LanguageSwitcher() {
|
||||
}, 3000)
|
||||
}
|
||||
|
||||
useClickOutside(dropdownRef, () => {
|
||||
setIsOpen(false);
|
||||
});
|
||||
useClickOutside(
|
||||
dropdownRef,
|
||||
() => {
|
||||
setIsOpen(false);
|
||||
},
|
||||
isOpen
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
const handleEscape = (event: KeyboardEvent) => {
|
||||
|
||||
@@ -18,9 +18,12 @@ interface ChildProps {
|
||||
export default function DropDownList({ children, value, callBack, translatedValue }: DropDownListProps) {
|
||||
const [isOpen, setIsOpen] = useState(false)
|
||||
const dropdownRef = useRef<HTMLDivElement>(null)
|
||||
useClickOutside(dropdownRef, () => {
|
||||
setIsOpen(false);
|
||||
});
|
||||
useClickOutside(dropdownRef,
|
||||
() => {
|
||||
setIsOpen(false);
|
||||
},
|
||||
isOpen
|
||||
);
|
||||
|
||||
const enhancedChildren = React.Children.map(children, (child, index) => {
|
||||
if (React.isValidElement<ChildProps>(child)) {
|
||||
|
||||
Reference in New Issue
Block a user