diff --git a/src/components/BeerById/BeerCommentForm.tsx b/src/components/BeerById/BeerCommentForm.tsx index 2d7c47f..34357e1 100644 --- a/src/components/BeerById/BeerCommentForm.tsx +++ b/src/components/BeerById/BeerCommentForm.tsx @@ -7,7 +7,7 @@ import { FunctionComponent } from 'react'; import { useForm, SubmitHandler } from 'react-hook-form'; import { z } from 'zod'; -import useBeerPostComments from '@/hooks/useBeerPostComments'; +import useBeerPostComments from '@/hooks/data-fetching/beer-comments/useBeerPostComments'; import CreateCommentValidationSchema from '@/services/types/CommentSchema/CreateCommentValidationSchema'; import CommentForm from '../ui/CommentForm'; diff --git a/src/components/BeerById/BeerInfoHeader.tsx b/src/components/BeerById/BeerInfoHeader.tsx index bbd9130..2b3047c 100644 --- a/src/components/BeerById/BeerInfoHeader.tsx +++ b/src/components/BeerById/BeerInfoHeader.tsx @@ -6,8 +6,8 @@ import UserContext from '@/contexts/userContext'; import { FaRegEdit } from 'react-icons/fa'; import beerPostQueryResult from '@/services/BeerPost/schema/BeerPostQueryResult'; import { z } from 'zod'; -import useGetBeerPostLikeCount from '@/hooks/useBeerPostLikeCount'; -import useTimeDistance from '@/hooks/useTimeDistance'; +import useGetBeerPostLikeCount from '@/hooks/data-fetching/beer-likes/useBeerPostLikeCount'; +import useTimeDistance from '@/hooks/utilities/useTimeDistance'; import BeerPostLikeButton from './BeerPostLikeButton'; interface BeerInfoHeaderProps { diff --git a/src/components/BeerById/BeerPostCommentsSection.tsx b/src/components/BeerById/BeerPostCommentsSection.tsx index 80186d5..1db174d 100644 --- a/src/components/BeerById/BeerPostCommentsSection.tsx +++ b/src/components/BeerById/BeerPostCommentsSection.tsx @@ -4,7 +4,7 @@ import beerPostQueryResult from '@/services/BeerPost/schema/BeerPostQueryResult' import { FC, MutableRefObject, useContext, useRef } from 'react'; import { z } from 'zod'; -import useBeerPostComments from '@/hooks/useBeerPostComments'; +import useBeerPostComments from '@/hooks/data-fetching/beer-comments/useBeerPostComments'; import { useRouter } from 'next/router'; import BeerCommentForm from './BeerCommentForm'; diff --git a/src/components/BeerById/BeerPostLikeButton.tsx b/src/components/BeerById/BeerPostLikeButton.tsx index fbc3806..14a2070 100644 --- a/src/components/BeerById/BeerPostLikeButton.tsx +++ b/src/components/BeerById/BeerPostLikeButton.tsx @@ -1,8 +1,8 @@ -import useCheckIfUserLikesBeerPost from '@/hooks/useCheckIfUserLikesBeerPost'; +import useCheckIfUserLikesBeerPost from '@/hooks/data-fetching/beer-likes/useCheckIfUserLikesBeerPost'; import sendBeerPostLikeRequest from '@/requests/sendBeerPostLikeRequest'; import { FC, useEffect, useState } from 'react'; -import useGetBeerPostLikeCount from '@/hooks/useBeerPostLikeCount'; +import useGetBeerPostLikeCount from '@/hooks/data-fetching/beer-likes/useBeerPostLikeCount'; import LikeButton from '../ui/LikeButton'; const BeerPostLikeButton: FC<{ diff --git a/src/components/BeerById/CommentCardBody.tsx b/src/components/BeerById/CommentCardBody.tsx index 47193e2..7e135be 100644 --- a/src/components/BeerById/CommentCardBody.tsx +++ b/src/components/BeerById/CommentCardBody.tsx @@ -1,4 +1,4 @@ -import useBeerPostComments from '@/hooks/useBeerPostComments'; +import useBeerPostComments from '@/hooks/data-fetching/beer-comments/useBeerPostComments'; import CommentQueryResult from '@/services/types/CommentSchema/CommentQueryResult'; import { FC, useState } from 'react'; import { useInView } from 'react-intersection-observer'; diff --git a/src/components/BeerById/CommentContentBody.tsx b/src/components/BeerById/CommentContentBody.tsx index ceafa89..6eca6f3 100644 --- a/src/components/BeerById/CommentContentBody.tsx +++ b/src/components/BeerById/CommentContentBody.tsx @@ -1,5 +1,5 @@ import UserContext from '@/contexts/userContext'; -import useTimeDistance from '@/hooks/useTimeDistance'; +import useTimeDistance from '@/hooks/utilities/useTimeDistance'; import { format } from 'date-fns'; import { Dispatch, FC, SetStateAction, useContext } from 'react'; import { Link, Rating } from 'react-daisyui'; diff --git a/src/components/BeerById/EditCommentBody.tsx b/src/components/BeerById/EditCommentBody.tsx index 4e317b7..32a6727 100644 --- a/src/components/BeerById/EditCommentBody.tsx +++ b/src/components/BeerById/EditCommentBody.tsx @@ -3,7 +3,7 @@ import { FC, useState, useEffect, Dispatch, SetStateAction } from 'react'; import { Rating } from 'react-daisyui'; import { useForm, SubmitHandler } from 'react-hook-form'; import { z } from 'zod'; -import useBeerPostComments from '@/hooks/useBeerPostComments'; +import useBeerPostComments from '@/hooks/data-fetching/beer-comments/useBeerPostComments'; import CommentQueryResult from '@/services/types/CommentSchema/CommentQueryResult'; import { useInView } from 'react-intersection-observer'; import CreateCommentValidationSchema from '@/services/types/CommentSchema/CreateCommentValidationSchema'; diff --git a/src/components/BeerIndex/BeerCard.tsx b/src/components/BeerIndex/BeerCard.tsx index 5b597e0..204ac61 100644 --- a/src/components/BeerIndex/BeerCard.tsx +++ b/src/components/BeerIndex/BeerCard.tsx @@ -4,7 +4,7 @@ import Image from 'next/image'; import beerPostQueryResult from '@/services/BeerPost/schema/BeerPostQueryResult'; import { z } from 'zod'; import UserContext from '@/contexts/userContext'; -import useGetBeerPostLikeCount from '@/hooks/useBeerPostLikeCount'; +import useGetBeerPostLikeCount from '@/hooks/data-fetching/beer-likes/useBeerPostLikeCount'; import BeerPostLikeButton from '../BeerById/BeerPostLikeButton'; const BeerCard: FC<{ post: z.infer }> = ({ post }) => { diff --git a/src/components/BreweryById/BreweryBeerSection.tsx b/src/components/BreweryById/BreweryBeerSection.tsx index bb4b0e4..aac35da 100644 --- a/src/components/BreweryById/BreweryBeerSection.tsx +++ b/src/components/BreweryById/BreweryBeerSection.tsx @@ -1,4 +1,4 @@ -import UseBeerPostsByBrewery from '@/hooks/useBeerPostsByBrewery'; +import UseBeerPostsByBrewery from '@/hooks/data-fetching/beer-posts/useBeerPostsByBrewery'; import BreweryPostQueryResult from '@/services/BreweryPost/types/BreweryPostQueryResult'; import Link from 'next/link'; import { FC } from 'react'; diff --git a/src/components/BreweryById/BreweryCommentsSection.tsx b/src/components/BreweryById/BreweryCommentsSection.tsx index f4be52d..0bb070c 100644 --- a/src/components/BreweryById/BreweryCommentsSection.tsx +++ b/src/components/BreweryById/BreweryCommentsSection.tsx @@ -2,12 +2,13 @@ import UserContext from '@/contexts/userContext'; import BreweryPostQueryResult from '@/services/BreweryPost/types/BreweryPostQueryResult'; import { FC, MutableRefObject, useContext, useRef } from 'react'; import { z } from 'zod'; -import useBreweryPostComments from '@/hooks/useBreweryPostComments'; import CreateCommentValidationSchema from '@/services/types/CommentSchema/CreateCommentValidationSchema'; import { zodResolver } from '@hookform/resolvers/zod'; import { useForm, SubmitHandler } from 'react-hook-form'; import APIResponseValidationSchema from '@/validation/APIResponseValidationSchema'; import CommentQueryResult from '@/services/types/CommentSchema/CommentQueryResult'; + +import useBreweryPostComments from '@/hooks/data-fetching/brewery-comments/useBreweryPostComments'; import LoadingComponent from '../BeerById/LoadingComponent'; import CommentsComponent from '../ui/CommentsComponent'; import CommentForm from '../ui/CommentForm'; diff --git a/src/components/BreweryById/BreweryInfoHeader.tsx b/src/components/BreweryById/BreweryInfoHeader.tsx index 35f18a4..66f94ff 100644 --- a/src/components/BreweryById/BreweryInfoHeader.tsx +++ b/src/components/BreweryById/BreweryInfoHeader.tsx @@ -1,6 +1,6 @@ import UserContext from '@/contexts/userContext'; -import useGetBreweryPostLikeCount from '@/hooks/useGetBreweryPostLikeCount'; -import useTimeDistance from '@/hooks/useTimeDistance'; +import useGetBreweryPostLikeCount from '@/hooks/data-fetching/brewery-likes/useGetBreweryPostLikeCount'; +import useTimeDistance from '@/hooks/utilities/useTimeDistance'; import BreweryPostQueryResult from '@/services/BreweryPost/types/BreweryPostQueryResult'; import { format } from 'date-fns'; import { FC, useContext } from 'react'; diff --git a/src/components/BreweryById/BreweryPostMap.tsx b/src/components/BreweryById/BreweryPostMap.tsx index c880f15..2543122 100644 --- a/src/components/BreweryById/BreweryPostMap.tsx +++ b/src/components/BreweryById/BreweryPostMap.tsx @@ -1,4 +1,4 @@ -import useMediaQuery from '@/hooks/useMediaQuery'; +import useMediaQuery from '@/hooks/utilities/useMediaQuery'; import 'mapbox-gl/dist/mapbox-gl.css'; import { FC, useMemo } from 'react'; import Map, { Marker } from 'react-map-gl'; diff --git a/src/components/BreweryIndex/BreweryCard.tsx b/src/components/BreweryIndex/BreweryCard.tsx index fb85024..e4f8594 100644 --- a/src/components/BreweryIndex/BreweryCard.tsx +++ b/src/components/BreweryIndex/BreweryCard.tsx @@ -1,5 +1,5 @@ import UserContext from '@/contexts/userContext'; -import useGetBreweryPostLikeCount from '@/hooks/useGetBreweryPostLikeCount'; +import useGetBreweryPostLikeCount from '@/hooks/data-fetching/brewery-likes/useGetBreweryPostLikeCount'; import BreweryPostQueryResult from '@/services/BreweryPost/types/BreweryPostQueryResult'; import { FC, useContext } from 'react'; import Link from 'next/link'; diff --git a/src/components/BreweryIndex/BreweryPostLikeButton.tsx b/src/components/BreweryIndex/BreweryPostLikeButton.tsx index b990420..0a58b04 100644 --- a/src/components/BreweryIndex/BreweryPostLikeButton.tsx +++ b/src/components/BreweryIndex/BreweryPostLikeButton.tsx @@ -1,5 +1,5 @@ -import useCheckIfUserLikesBreweryPost from '@/hooks/useCheckIfUserLikesBreweryPost'; -import useGetBreweryPostLikeCount from '@/hooks/useGetBreweryPostLikeCount'; +import useCheckIfUserLikesBreweryPost from '@/hooks/data-fetching/brewery-likes/useCheckIfUserLikesBreweryPost'; +import useGetBreweryPostLikeCount from '@/hooks/data-fetching/brewery-likes/useGetBreweryPostLikeCount'; import sendBreweryPostLikeRequest from '@/requests/sendBreweryPostLikeRequest'; import { FC, useState } from 'react'; import LikeButton from '../ui/LikeButton'; diff --git a/src/components/ui/CommentsComponent.tsx b/src/components/ui/CommentsComponent.tsx index f91484c..00c6e0b 100644 --- a/src/components/ui/CommentsComponent.tsx +++ b/src/components/ui/CommentsComponent.tsx @@ -3,8 +3,9 @@ import { FaArrowUp } from 'react-icons/fa'; import { useInView } from 'react-intersection-observer'; -import useBeerPostComments from '@/hooks/useBeerPostComments'; -import useBreweryPostComments from '@/hooks/useBreweryPostComments'; +import useBeerPostComments from '@/hooks/data-fetching/beer-comments/useBeerPostComments'; + +import useBreweryPostComments from '@/hooks/data-fetching/brewery-comments/useBreweryPostComments'; import NoCommentsCard from '../BeerById/NoCommentsCard'; import LoadingComponent from '../BeerById/LoadingComponent'; import CommentCardBody from '../BeerById/CommentCardBody'; diff --git a/src/components/ui/Navbar.tsx b/src/components/ui/Navbar.tsx index 324d972..6162052 100644 --- a/src/components/ui/Navbar.tsx +++ b/src/components/ui/Navbar.tsx @@ -1,10 +1,11 @@ -import useMediaQuery from '@/hooks/useMediaQuery'; -import useNavbar from '@/hooks/useNavbar'; +import useMediaQuery from '@/hooks/utilities/useMediaQuery'; +import useNavbar from '@/hooks/utilities/useNavbar'; +import useTheme from '@/hooks/utilities/useTheme'; + import Link from 'next/link'; import { FC } from 'react'; import { MdDarkMode, MdLightMode } from 'react-icons/md'; import { GiHamburgerMenu } from 'react-icons/gi'; -import useTheme from '@/hooks/useTheme'; const DesktopLinks: FC = () => { const { pages, currentURL } = useNavbar(); diff --git a/src/contexts/userContext.ts b/src/contexts/userContext.ts index 7345769..ac84c98 100644 --- a/src/contexts/userContext.ts +++ b/src/contexts/userContext.ts @@ -1,4 +1,4 @@ -import useUser from '@/hooks/useUser'; +import useUser from '@/hooks/auth/useUser'; import GetUserSchema from '@/services/User/schema/GetUserSchema'; import { createContext } from 'react'; import { z } from 'zod'; diff --git a/src/hooks/useRedirectIfLoggedIn.ts b/src/hooks/auth/useRedirectIfLoggedIn.ts similarity index 100% rename from src/hooks/useRedirectIfLoggedIn.ts rename to src/hooks/auth/useRedirectIfLoggedIn.ts diff --git a/src/hooks/useUser.ts b/src/hooks/auth/useUser.ts similarity index 100% rename from src/hooks/useUser.ts rename to src/hooks/auth/useUser.ts diff --git a/src/hooks/useBeerPostComments.ts b/src/hooks/data-fetching/beer-comments/useBeerPostComments.ts similarity index 100% rename from src/hooks/useBeerPostComments.ts rename to src/hooks/data-fetching/beer-comments/useBeerPostComments.ts diff --git a/src/hooks/useBeerPostLikeCount.ts b/src/hooks/data-fetching/beer-likes/useBeerPostLikeCount.ts similarity index 100% rename from src/hooks/useBeerPostLikeCount.ts rename to src/hooks/data-fetching/beer-likes/useBeerPostLikeCount.ts diff --git a/src/hooks/useCheckIfUserLikesBeerPost.ts b/src/hooks/data-fetching/beer-likes/useCheckIfUserLikesBeerPost.ts similarity index 100% rename from src/hooks/useCheckIfUserLikesBeerPost.ts rename to src/hooks/data-fetching/beer-likes/useCheckIfUserLikesBeerPost.ts diff --git a/src/hooks/useBeerPostSearch.ts b/src/hooks/data-fetching/beer-posts/useBeerPostSearch.ts similarity index 100% rename from src/hooks/useBeerPostSearch.ts rename to src/hooks/data-fetching/beer-posts/useBeerPostSearch.ts diff --git a/src/hooks/useBeerPosts.ts b/src/hooks/data-fetching/beer-posts/useBeerPosts.ts similarity index 100% rename from src/hooks/useBeerPosts.ts rename to src/hooks/data-fetching/beer-posts/useBeerPosts.ts diff --git a/src/hooks/useBeerPostsByBrewery.ts b/src/hooks/data-fetching/beer-posts/useBeerPostsByBrewery.ts similarity index 100% rename from src/hooks/useBeerPostsByBrewery.ts rename to src/hooks/data-fetching/beer-posts/useBeerPostsByBrewery.ts diff --git a/src/hooks/useBreweryPostComments.ts b/src/hooks/data-fetching/brewery-comments/useBreweryPostComments.ts similarity index 100% rename from src/hooks/useBreweryPostComments.ts rename to src/hooks/data-fetching/brewery-comments/useBreweryPostComments.ts diff --git a/src/hooks/useCheckIfUserLikesBreweryPost.ts b/src/hooks/data-fetching/brewery-likes/useCheckIfUserLikesBreweryPost.ts similarity index 100% rename from src/hooks/useCheckIfUserLikesBreweryPost.ts rename to src/hooks/data-fetching/brewery-likes/useCheckIfUserLikesBreweryPost.ts diff --git a/src/hooks/useGetBreweryPostLikeCount.ts b/src/hooks/data-fetching/brewery-likes/useGetBreweryPostLikeCount.ts similarity index 100% rename from src/hooks/useGetBreweryPostLikeCount.ts rename to src/hooks/data-fetching/brewery-likes/useGetBreweryPostLikeCount.ts diff --git a/src/hooks/useBreweryPosts.ts b/src/hooks/data-fetching/brewery-posts/useBreweryPosts.ts similarity index 100% rename from src/hooks/useBreweryPosts.ts rename to src/hooks/data-fetching/brewery-posts/useBreweryPosts.ts diff --git a/src/hooks/useGeolocation.ts b/src/hooks/utilities/useGeolocation.ts similarity index 100% rename from src/hooks/useGeolocation.ts rename to src/hooks/utilities/useGeolocation.ts diff --git a/src/hooks/useMediaQuery.ts b/src/hooks/utilities/useMediaQuery.ts similarity index 100% rename from src/hooks/useMediaQuery.ts rename to src/hooks/utilities/useMediaQuery.ts diff --git a/src/hooks/useNavbar.ts b/src/hooks/utilities/useNavbar.ts similarity index 100% rename from src/hooks/useNavbar.ts rename to src/hooks/utilities/useNavbar.ts diff --git a/src/hooks/useTheme.ts b/src/hooks/utilities/useTheme.ts similarity index 100% rename from src/hooks/useTheme.ts rename to src/hooks/utilities/useTheme.ts diff --git a/src/hooks/useTimeDistance.ts b/src/hooks/utilities/useTimeDistance.ts similarity index 100% rename from src/hooks/useTimeDistance.ts rename to src/hooks/utilities/useTimeDistance.ts diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index a8ca703..aa265a4 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -1,5 +1,5 @@ import UserContext from '@/contexts/userContext'; -import useUser from '@/hooks/useUser'; + import '@/styles/globals.css'; import type { AppProps } from 'next/app'; import { useEffect } from 'react'; @@ -10,6 +10,7 @@ import { Analytics } from '@vercel/analytics/react'; import { Space_Grotesk } from 'next/font/google'; import Head from 'next/head'; import Layout from '@/components/ui/Layout'; +import useUser from '@/hooks/auth/useUser'; const spaceGrotesk = Space_Grotesk({ subsets: ['latin'], diff --git a/src/pages/beers/[id]/index.tsx b/src/pages/beers/[id]/index.tsx index 6cf7fa3..dcf4e02 100644 --- a/src/pages/beers/[id]/index.tsx +++ b/src/pages/beers/[id]/index.tsx @@ -16,7 +16,7 @@ import { z } from 'zod'; import 'react-responsive-carousel/lib/styles/carousel.min.css'; import { Carousel } from 'react-responsive-carousel'; -import useMediaQuery from '@/hooks/useMediaQuery'; +import useMediaQuery from '@/hooks/utilities/useMediaQuery'; import { Tab } from '@headlessui/react'; interface BeerPageProps { diff --git a/src/pages/beers/index.tsx b/src/pages/beers/index.tsx index df6b2dd..3e21a0c 100644 --- a/src/pages/beers/index.tsx +++ b/src/pages/beers/index.tsx @@ -9,7 +9,7 @@ import { MutableRefObject, useContext, useRef } from 'react'; import { useInView } from 'react-intersection-observer'; import Spinner from '@/components/ui/Spinner'; -import useBeerPosts from '@/hooks/useBeerPosts'; +import useBeerPosts from '@/hooks/data-fetching/beer-posts/useBeerPosts'; import { FaArrowUp, FaPlus } from 'react-icons/fa'; import LoadingCard from '@/components/ui/LoadingCard'; diff --git a/src/pages/beers/search.tsx b/src/pages/beers/search.tsx index 29b65a6..b595cf4 100644 --- a/src/pages/beers/search.tsx +++ b/src/pages/beers/search.tsx @@ -6,7 +6,7 @@ import { ChangeEvent, useEffect, useState } from 'react'; import Spinner from '@/components/ui/Spinner'; import debounce from 'lodash/debounce'; -import useBeerPostSearch from '@/hooks/useBeerPostSearch'; +import useBeerPostSearch from '@/hooks/data-fetching/beer-posts/useBeerPostSearch'; import FormLabel from '@/components/ui/forms/FormLabel'; const DEBOUNCE_DELAY = 300; diff --git a/src/pages/breweries/[id].tsx b/src/pages/breweries/[id].tsx index 351ae30..291c612 100644 --- a/src/pages/breweries/[id].tsx +++ b/src/pages/breweries/[id].tsx @@ -7,7 +7,7 @@ import Head from 'next/head'; import Image from 'next/image'; import 'react-responsive-carousel/lib/styles/carousel.min.css'; // requires a loader import { Carousel } from 'react-responsive-carousel'; -import useMediaQuery from '@/hooks/useMediaQuery'; +import useMediaQuery from '@/hooks/utilities/useMediaQuery'; import { Tab } from '@headlessui/react'; import BreweryInfoHeader from '@/components/BreweryById/BreweryInfoHeader'; import BreweryPostMap from '@/components/BreweryById/BreweryPostMap'; diff --git a/src/pages/breweries/index.tsx b/src/pages/breweries/index.tsx index 29cba00..96e9add 100644 --- a/src/pages/breweries/index.tsx +++ b/src/pages/breweries/index.tsx @@ -2,7 +2,7 @@ import BreweryCard from '@/components/BreweryIndex/BreweryCard'; import LoadingCard from '@/components/ui/LoadingCard'; import Spinner from '@/components/ui/Spinner'; import UserContext from '@/contexts/userContext'; -import useBreweryPosts from '@/hooks/useBreweryPosts'; +import useBreweryPosts from '@/hooks/data-fetching/brewery-posts/useBreweryPosts'; import BreweryPostQueryResult from '@/services/BreweryPost/types/BreweryPostQueryResult'; import { NextPage } from 'next'; import Head from 'next/head'; diff --git a/src/pages/breweries/map.tsx b/src/pages/breweries/map.tsx index 90d85c1..cfa5854 100644 --- a/src/pages/breweries/map.tsx +++ b/src/pages/breweries/map.tsx @@ -13,7 +13,7 @@ import DBClient from '@/prisma/DBClient'; import LocationMarker from '@/components/ui/LocationMarker'; import Link from 'next/link'; import Head from 'next/head'; -import useGeolocation from '@/hooks/useGeolocation'; +import useGeolocation from '@/hooks/utilities/useGeolocation'; type MapStyles = Record<'light' | 'dark', `mapbox://styles/mapbox/${string}`>; diff --git a/src/pages/login/index.tsx b/src/pages/login/index.tsx index b7d75bf..3c6241e 100644 --- a/src/pages/login/index.tsx +++ b/src/pages/login/index.tsx @@ -7,7 +7,7 @@ import { FaUserCircle } from 'react-icons/fa'; import Head from 'next/head'; import Link from 'next/link'; -import useRedirectWhenLoggedIn from '@/hooks/useRedirectIfLoggedIn'; +import useRedirectWhenLoggedIn from '@/hooks/auth/useRedirectIfLoggedIn'; const LoginPage: NextPage = () => { useRedirectWhenLoggedIn(); diff --git a/src/pages/register/index.tsx b/src/pages/register/index.tsx index 9559b45..d67e25b 100644 --- a/src/pages/register/index.tsx +++ b/src/pages/register/index.tsx @@ -1,7 +1,7 @@ import RegisterUserForm from '@/components/RegisterUserForm'; import FormPageLayout from '@/components/ui/forms/FormPageLayout'; -import useRedirectWhenLoggedIn from '@/hooks/useRedirectIfLoggedIn'; +import useRedirectWhenLoggedIn from '@/hooks/auth/useRedirectIfLoggedIn'; import { NextPage } from 'next'; import Head from 'next/head'; import { BiUser } from 'react-icons/bi'; diff --git a/src/pages/user/current.tsx b/src/pages/user/current.tsx index c152068..cf93bd6 100644 --- a/src/pages/user/current.tsx +++ b/src/pages/user/current.tsx @@ -4,7 +4,7 @@ import UserContext from '@/contexts/userContext'; import { GetServerSideProps, NextPage } from 'next'; import { useContext } from 'react'; -import useMediaQuery from '@/hooks/useMediaQuery'; +import useMediaQuery from '@/hooks/utilities/useMediaQuery'; const ProtectedPage: NextPage = () => { const { user, isLoading } = useContext(UserContext);