diff --git a/src/pages/profile/Profile.tsx b/src/pages/profile/Profile.tsx index 05d70d9..022f306 100644 --- a/src/pages/profile/Profile.tsx +++ b/src/pages/profile/Profile.tsx @@ -20,7 +20,7 @@ import { MySimpleGrid } from '@components/MySimpleGrid'; import { Card } from '@components/cards/Card'; import { Aside } from '@components/Aside'; import { MainHead } from '@components/Head'; -import { useProfile } from '@hooks/querys'; +import { useProfile } from '@hooks/queries'; import { parseDate } from '@utils/utils'; import { CardType } from '@components/types'; import { ResultLength } from '@components/ResultLength'; diff --git a/src/pages/profile/account/MyAccount.tsx b/src/pages/profile/account/MyAccount.tsx index edb2d60..06cb313 100644 --- a/src/pages/profile/account/MyAccount.tsx +++ b/src/pages/profile/account/MyAccount.tsx @@ -13,7 +13,7 @@ import { // import { Card } from '@components/cards/Card'; // import { Aside } from '@components/Aside'; import { MainHead } from '@components/Head'; -// import { useProfile } from '@hooks/querys'; +// import { useProfile } from '@hooks/queries'; // import { parseDate } from '@utils/utils'; // import { CardType } from '@components/types'; // import ResultLength from '@components/ResultLength'; diff --git a/src/services/auth/auth.tsx b/src/services/auth/auth.tsx index 43b97a0..29d0ca3 100644 --- a/src/services/auth/auth.tsx +++ b/src/services/auth/auth.tsx @@ -3,20 +3,21 @@ import { Button, useColorModeValue } from '@chakra-ui/react'; import { useNavigate } from 'react-router-dom'; import { GrGoogle } from 'react-icons/gr'; import { GoogleAuthProvider, signInWithPopup } from 'firebase/auth'; +// import Cookies from 'js-cookie'; import { logIn } from './config'; -import { useCheckUser } from '@hooks/querys'; +import { useCheckUser } from '@hooks/queries'; import { useAuth } from '@contexts/AuthContext'; import { useAccountActions } from '@hooks/useAccountActions'; export function SignIn() { - const provider = new GoogleAuthProvider(); - provider.setCustomParameters({ prompt: 'select_account' }); const navigate = useNavigate(); const { currentUser } = useAuth(); const { logOut } = useAccountActions(); const [userId, setUserId] = useState(''); const { data, isPending, error, refetch } = useCheckUser(userId); + const provider = new GoogleAuthProvider(); + provider.setCustomParameters({ prompt: 'select_account' }); async function SignInWithGoogle() { try { @@ -25,6 +26,7 @@ export function SignIn() { if (result) { const token = await result.user.getIdToken(true); await window.localStorage.setItem('app_tk', token); + // Cookies.set('app_tk', token); // document.cookie = `app_tk=${token}; SameSite=None; path=/;`; } } catch (error) {