mirror of
https://github.com/TheRealOwenRees/echecsfrance.git
synced 2026-11-18 07:22:06 +00:00
Lint
This commit is contained in:
@@ -1,11 +1,8 @@
|
||||
"use client";
|
||||
|
||||
import { useState } from "react";
|
||||
|
||||
import { Button, Menu } from "@headlessui/react";
|
||||
import { signIn, signOut, useSession } from "next-auth/react";
|
||||
import { MenuButton } from "@headlessui/react";
|
||||
import { signIn, useSession } from "next-auth/react";
|
||||
import { useTranslations } from "next-intl";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { RxAvatar } from "react-icons/rx";
|
||||
|
||||
import { useAuthMenuOptions } from "@/hooks/useAuthMenuOptions";
|
||||
@@ -27,9 +24,9 @@ const AuthButton = () => {
|
||||
items={menuItems}
|
||||
containerClassName="flex items-center justify-center"
|
||||
buttonComponent={
|
||||
<Menu.Button>
|
||||
<MenuButton>
|
||||
<RxAvatar className="h-6 w-6" />
|
||||
</Menu.Button>
|
||||
</MenuButton>
|
||||
}
|
||||
/>
|
||||
);
|
||||
|
||||
@@ -37,7 +37,7 @@ export const LocaleChecker = ({ children }: LocaleCheckerProps) => {
|
||||
) {
|
||||
router.push({ pathname, params: params as any }, { locale: userLocale });
|
||||
}
|
||||
}, [locale, sessionData, status]);
|
||||
}, [locale, sessionData, status, params, pathname, router, userLocale]);
|
||||
|
||||
// To avoid flickering, we don't render the children until we have the user's locale
|
||||
if (status === "loading") return null;
|
||||
|
||||
Reference in New Issue
Block a user