diff --git a/components/CollectionCard.tsx b/components/CollectionCard.tsx index f57fcc0..bb3a3dd 100644 --- a/components/CollectionCard.tsx +++ b/components/CollectionCard.tsx @@ -10,7 +10,7 @@ import EditCollectionSharingModal from "./ModalContent/EditCollectionSharingModa import DeleteCollectionModal from "./ModalContent/DeleteCollectionModal"; import { dropdownTriggerer } from "@/lib/client/utils"; import { useTranslation } from "next-i18next"; -import { useUser } from "@/hooks/store/users"; +import { useUser } from "@/hooks/store/user"; type Props = { collection: CollectionIncludingMembersAndLinkCount; diff --git a/components/CollectionListing.tsx b/components/CollectionListing.tsx index 725c0d6..75b12cc 100644 --- a/components/CollectionListing.tsx +++ b/components/CollectionListing.tsx @@ -16,7 +16,7 @@ import { useRouter } from "next/router"; import toast from "react-hot-toast"; import { useTranslation } from "next-i18next"; import { useCollections, useUpdateCollection } from "@/hooks/store/collections"; -import { useUpdateUser, useUser } from "@/hooks/store/users"; +import { useUpdateUser, useUser } from "@/hooks/store/user"; interface ExtendedTreeItem extends TreeItem { data: Collection; diff --git a/components/LinkViews/LinkCard.tsx b/components/LinkViews/LinkCard.tsx index 189dab4..e28ee9c 100644 --- a/components/LinkViews/LinkCard.tsx +++ b/components/LinkViews/LinkCard.tsx @@ -20,7 +20,7 @@ import toast from "react-hot-toast"; import LinkTypeBadge from "./LinkComponents/LinkTypeBadge"; import { useTranslation } from "next-i18next"; import { useCollections } from "@/hooks/store/collections"; -import { useUser } from "@/hooks/store/users"; +import { useUser } from "@/hooks/store/user"; type Props = { link: LinkIncludingShortenedCollectionAndTags; diff --git a/components/LinkViews/LinkComponents/LinkActions.tsx b/components/LinkViews/LinkComponents/LinkActions.tsx index 0d0b7eb..0a3775e 100644 --- a/components/LinkViews/LinkComponents/LinkActions.tsx +++ b/components/LinkViews/LinkComponents/LinkActions.tsx @@ -11,7 +11,7 @@ import useLinkStore from "@/store/links"; import { toast } from "react-hot-toast"; import { dropdownTriggerer } from "@/lib/client/utils"; import { useTranslation } from "next-i18next"; -import { useUser } from "@/hooks/store/users"; +import { useUser } from "@/hooks/store/user"; type Props = { link: LinkIncludingShortenedCollectionAndTags; diff --git a/components/LinkViews/LinkList.tsx b/components/LinkViews/LinkList.tsx index 71c70cf..9755ad9 100644 --- a/components/LinkViews/LinkList.tsx +++ b/components/LinkViews/LinkList.tsx @@ -16,7 +16,7 @@ import toast from "react-hot-toast"; import LinkTypeBadge from "./LinkComponents/LinkTypeBadge"; import { useTranslation } from "next-i18next"; import { useCollections } from "@/hooks/store/collections"; -import { useUser } from "@/hooks/store/users"; +import { useUser } from "@/hooks/store/user"; type Props = { link: LinkIncludingShortenedCollectionAndTags; diff --git a/components/LinkViews/LinkMasonry.tsx b/components/LinkViews/LinkMasonry.tsx index 8313eb3..ca05f1a 100644 --- a/components/LinkViews/LinkMasonry.tsx +++ b/components/LinkViews/LinkMasonry.tsx @@ -20,7 +20,7 @@ import toast from "react-hot-toast"; import LinkTypeBadge from "./LinkComponents/LinkTypeBadge"; import { useTranslation } from "next-i18next"; import { useCollections } from "@/hooks/store/collections"; -import { useUser } from "@/hooks/store/users"; +import { useUser } from "@/hooks/store/user"; type Props = { link: LinkIncludingShortenedCollectionAndTags; diff --git a/components/ModalContent/EditCollectionSharingModal.tsx b/components/ModalContent/EditCollectionSharingModal.tsx index fd2207e..158f817 100644 --- a/components/ModalContent/EditCollectionSharingModal.tsx +++ b/components/ModalContent/EditCollectionSharingModal.tsx @@ -10,7 +10,7 @@ import Modal from "../Modal"; import { dropdownTriggerer } from "@/lib/client/utils"; import { useTranslation } from "next-i18next"; import { useUpdateCollection } from "@/hooks/store/collections"; -import { useUser } from "@/hooks/store/users"; +import { useUser } from "@/hooks/store/user"; type Props = { onClose: Function; diff --git a/components/ModalContent/PreservedFormatsModal.tsx b/components/ModalContent/PreservedFormatsModal.tsx index e83d749..30bd7b6 100644 --- a/components/ModalContent/PreservedFormatsModal.tsx +++ b/components/ModalContent/PreservedFormatsModal.tsx @@ -19,7 +19,7 @@ import PreservedFormatRow from "@/components/PreserverdFormatRow"; import getPublicUserData from "@/lib/client/getPublicUserData"; import { useTranslation } from "next-i18next"; import { BeatLoader } from "react-spinners"; -import { useUser } from "@/hooks/store/users"; +import { useUser } from "@/hooks/store/user"; type Props = { onClose: Function; diff --git a/components/ProfileDropdown.tsx b/components/ProfileDropdown.tsx index d610277..2f262c2 100644 --- a/components/ProfileDropdown.tsx +++ b/components/ProfileDropdown.tsx @@ -4,7 +4,7 @@ import ProfilePhoto from "./ProfilePhoto"; import Link from "next/link"; import { signOut } from "next-auth/react"; import { useTranslation } from "next-i18next"; -import { useUser } from "@/hooks/store/users"; +import { useUser } from "@/hooks/store/user"; export default function ProfileDropdown() { const { t } = useTranslation(); diff --git a/hooks/store/users.tsx b/hooks/store/user.tsx similarity index 100% rename from hooks/store/users.tsx rename to hooks/store/user.tsx diff --git a/hooks/useCollectivePermissions.ts b/hooks/useCollectivePermissions.ts index aebb842..e093b64 100644 --- a/hooks/useCollectivePermissions.ts +++ b/hooks/useCollectivePermissions.ts @@ -1,7 +1,7 @@ import { Member } from "@/types/global"; import { useEffect, useState } from "react"; import { useCollections } from "./store/collections"; -import { useUser } from "./store/users"; +import { useUser } from "./store/user"; export default function useCollectivePermissions(collectionIds: number[]) { const { data: collections = [] } = useCollections(); diff --git a/hooks/useInitialData.tsx b/hooks/useInitialData.tsx index bb2686f..cf91623 100644 --- a/hooks/useInitialData.tsx +++ b/hooks/useInitialData.tsx @@ -2,7 +2,7 @@ import { useEffect } from "react"; import { useSession } from "next-auth/react"; import useTagStore from "@/store/tags"; import useLocalSettingsStore from "@/store/localSettings"; -import { useUser } from "./store/users"; +import { useUser } from "./store/user"; export default function useInitialData() { const { status, data } = useSession(); diff --git a/hooks/usePermissions.tsx b/hooks/usePermissions.tsx index c6e806f..7b6725a 100644 --- a/hooks/usePermissions.tsx +++ b/hooks/usePermissions.tsx @@ -1,7 +1,7 @@ import { Member } from "@/types/global"; import { useEffect, useState } from "react"; import { useCollections } from "./store/collections"; -import { useUser } from "./store/users"; +import { useUser } from "./store/user"; export default function usePermissions(collectionId: number) { const { data: collections = [] } = useCollections(); diff --git a/layouts/AuthRedirect.tsx b/layouts/AuthRedirect.tsx index 69e372e..821065a 100644 --- a/layouts/AuthRedirect.tsx +++ b/layouts/AuthRedirect.tsx @@ -2,7 +2,7 @@ import { ReactNode, useEffect, useState } from "react"; import { useRouter } from "next/router"; import { useSession } from "next-auth/react"; import useInitialData from "@/hooks/useInitialData"; -import { useUser } from "@/hooks/store/users"; +import { useUser } from "@/hooks/store/user"; interface Props { children: ReactNode; diff --git a/pages/collections/[id].tsx b/pages/collections/[id].tsx index e1bb1d9..0c7ad8e 100644 --- a/pages/collections/[id].tsx +++ b/pages/collections/[id].tsx @@ -25,7 +25,7 @@ import getServerSideProps from "@/lib/client/getServerSideProps"; import { useTranslation } from "next-i18next"; import LinkListOptions from "@/components/LinkListOptions"; import { useCollections } from "@/hooks/store/collections"; -import { useUser } from "@/hooks/store/users"; +import { useUser } from "@/hooks/store/user"; export default function Index() { const { t } = useTranslation(); diff --git a/pages/settings/account.tsx b/pages/settings/account.tsx index 5783bf1..5c4b109 100644 --- a/pages/settings/account.tsx +++ b/pages/settings/account.tsx @@ -16,7 +16,7 @@ import Button from "@/components/ui/Button"; import { i18n } from "next-i18next.config"; import { useTranslation } from "next-i18next"; import getServerSideProps from "@/lib/client/getServerSideProps"; -import { useUpdateUser, useUser } from "@/hooks/store/users"; +import { useUpdateUser, useUser } from "@/hooks/store/user"; const emailEnabled = process.env.NEXT_PUBLIC_EMAIL_PROVIDER; diff --git a/pages/settings/password.tsx b/pages/settings/password.tsx index 2c7c1b3..d63daf4 100644 --- a/pages/settings/password.tsx +++ b/pages/settings/password.tsx @@ -5,7 +5,7 @@ import { toast } from "react-hot-toast"; import TextInput from "@/components/TextInput"; import { useTranslation } from "next-i18next"; import getServerSideProps from "@/lib/client/getServerSideProps"; -import { useUpdateUser, useUser } from "@/hooks/store/users"; +import { useUpdateUser, useUser } from "@/hooks/store/user"; export default function Password() { const { t } = useTranslation(); diff --git a/pages/settings/preference.tsx b/pages/settings/preference.tsx index ae5840b..18baee7 100644 --- a/pages/settings/preference.tsx +++ b/pages/settings/preference.tsx @@ -7,7 +7,7 @@ import useLocalSettingsStore from "@/store/localSettings"; import { useTranslation } from "next-i18next"; import getServerSideProps from "@/lib/client/getServerSideProps"; // Import getServerSideProps for server-side data fetching import { LinksRouteTo } from "@prisma/client"; -import { useUpdateUser, useUser } from "@/hooks/store/users"; +import { useUpdateUser, useUser } from "@/hooks/store/user"; export default function Appearance() { const { t } = useTranslation(); diff --git a/pages/subscribe.tsx b/pages/subscribe.tsx index c795da9..fb2ad3a 100644 --- a/pages/subscribe.tsx +++ b/pages/subscribe.tsx @@ -7,7 +7,7 @@ import { Plan } from "@/types/global"; import Button from "@/components/ui/Button"; import getServerSideProps from "@/lib/client/getServerSideProps"; import { Trans, useTranslation } from "next-i18next"; -import { useUser } from "@/hooks/store/users"; +import { useUser } from "@/hooks/store/user"; const stripeEnabled = process.env.NEXT_PUBLIC_STRIPE === "true";