rename users hook to user
This commit is contained in:
parent
099bc9e054
commit
be5400f7cb
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
Ŝarĝante…
Reference in New Issue