import React, { Dispatch, SetStateAction, useEffect } from "react"; import { Sort } from "@/types/global"; import { dropdownTriggerer } from "@/lib/client/utils"; import { TFunction } from "i18next"; import useLocalSettingsStore from "@/store/localSettings"; type Props = { sortBy: Sort; setSort: Dispatch>; t: TFunction<"translation", undefined>; }; export default function SortDropdown({ sortBy, setSort, t }: Props) { const { updateSettings } = useLocalSettingsStore(); useEffect(() => { updateSettings({ sortBy }); }, [sortBy]); return (
); }