payment not found
This commit is contained in:
@@ -5,10 +5,12 @@ import { useRouter, usePathname } from "next/navigation";
|
||||
import { Check, ChevronDown, Globe } from "lucide-react";
|
||||
import { locales, localeFlags, localeNames, type Locale } from "@/i18n/config";
|
||||
import { useLocale } from "next-intl";
|
||||
import { useQueryClient } from "@tanstack/react-query";
|
||||
|
||||
export default function LanguageSelectRadix() {
|
||||
const router = useRouter();
|
||||
const pathname = usePathname();
|
||||
const queryClient = useQueryClient();
|
||||
const currentLocale = useLocale() as Locale;
|
||||
const [isPending, startTransition] = useTransition();
|
||||
const [isOpen, setIsOpen] = useState(false);
|
||||
@@ -46,6 +48,9 @@ export default function LanguageSelectRadix() {
|
||||
}, 100); // Small delay ensures navigation completes
|
||||
});
|
||||
|
||||
setTimeout(() => {
|
||||
queryClient.invalidateQueries({ queryKey: [newLocale] });
|
||||
}, 200);
|
||||
setIsOpen(false);
|
||||
};
|
||||
|
||||
@@ -55,7 +60,7 @@ export default function LanguageSelectRadix() {
|
||||
<button
|
||||
onClick={() => setIsOpen(!isOpen)}
|
||||
disabled={isPending}
|
||||
className="inline-flex items-center justify-between gap-2 px-2 py-1 border border-gray-300 hover:border-red-600
|
||||
className="inline-flex items-center justify-between gap-2 px-2 py-1 border border-gray-300 hover:border-red-600
|
||||
rounded-lg text-white text-sm font-medium shadow-sm hover:bg-red-600 disabled:opacity-50 disabled:cursor-not-allowed transition-all"
|
||||
aria-label="Tilni tanlash"
|
||||
aria-expanded={isOpen}
|
||||
|
||||
Reference in New Issue
Block a user