diff --git a/app/(pages)/(user)/u/[username]/page.tsx b/app/(pages)/(user)/u/[username]/page.tsx index e715d82f..dee5f09e 100644 --- a/app/(pages)/(user)/u/[username]/page.tsx +++ b/app/(pages)/(user)/u/[username]/page.tsx @@ -8,8 +8,8 @@ import History from '@/features/users/user-profile/user-history/user-history.com import Statistics from '@/features/users/user-profile/user-statistics/user-statistics.component'; import getFavouriteList from '@/services/api/favourite/getFavouriteList'; +import getUserHistory from '@/services/api/history/getUserHistory'; import getUserActivity from '@/services/api/user/getUserActivity'; -import getUserHistory from '@/services/api/user/getUserHistory'; import getQueryClient from '@/utils/get-query-client'; interface Props { diff --git a/features/users/user-history/history.tsx b/features/users/user-history/history.tsx index 3070b48e..2ed8da35 100644 --- a/features/users/user-history/history.tsx +++ b/features/users/user-history/history.tsx @@ -10,7 +10,7 @@ import Card from '@/components/ui/card'; import NotFound from '@/components/ui/not-found'; import Stack from '@/components/ui/stack'; -import useUserHistory from '@/services/hooks/user/use-user-history'; +import useUserHistory from '@/services/hooks/history/use-user-history'; interface Props { className?: string; diff --git a/features/users/user-profile/user-history/history-modal.tsx b/features/users/user-profile/user-history/history-modal.tsx index acc37852..76e11bf8 100644 --- a/features/users/user-profile/user-history/history-modal.tsx +++ b/features/users/user-profile/user-history/history-modal.tsx @@ -5,7 +5,7 @@ import { useParams } from 'next/navigation'; import HistoryItem from '@/components/history-item'; import LoadMoreButton from '@/components/load-more-button'; -import useUserHistory from '@/services/hooks/user/use-user-history'; +import useUserHistory from '@/services/hooks/history/use-user-history'; interface Props { className?: string; diff --git a/features/users/user-profile/user-history/user-history.component.tsx b/features/users/user-profile/user-history/user-history.component.tsx index 65b7e83c..ee0a9cfa 100644 --- a/features/users/user-profile/user-history/user-history.component.tsx +++ b/features/users/user-profile/user-history/user-history.component.tsx @@ -11,7 +11,7 @@ import { Button } from '@/components/ui/button'; import Header from '@/components/ui/header'; import NotFound from '@/components/ui/not-found'; -import useUserHistory from '@/services/hooks/user/use-user-history'; +import useUserHistory from '@/services/hooks/history/use-user-history'; import { useModalContext } from '@/services/providers/modal-provider'; import { cn } from '@/utils/utils'; diff --git a/services/api/user/getUserHistory.ts b/services/api/history/getUserHistory.ts similarity index 86% rename from services/api/user/getUserHistory.ts rename to services/api/history/getUserHistory.ts index 09b09fe8..0eba94d0 100644 --- a/services/api/user/getUserHistory.ts +++ b/services/api/history/getUserHistory.ts @@ -1,6 +1,5 @@ import { BaseFetchRequestProps, - FetchRequestProps, fetchRequest, } from '@/services/api/fetchRequest'; @@ -18,7 +17,7 @@ export default async function req({ }: BaseFetchRequestProps): Promise { return fetchRequest({ ...props, - path: `/user/${params?.username}/history`, + path: `/history/user/${params?.username}`, method: 'get', page: page, size: size, diff --git a/services/hooks/user/use-user-history.ts b/services/hooks/history/use-user-history.ts similarity index 93% rename from services/hooks/user/use-user-history.ts rename to services/hooks/history/use-user-history.ts index e90f1ffd..46c7d0a2 100644 --- a/services/hooks/user/use-user-history.ts +++ b/services/hooks/history/use-user-history.ts @@ -1,4 +1,4 @@ -import getUserHistory, { Params } from '@/services/api/user/getUserHistory'; +import getUserHistory, { Params } from '@/services/api/history/getUserHistory'; import useInfiniteList from '@/services/hooks/use-infinite-list'; import { useSettingsContext } from '@/services/providers/settings-provider'; import { convertAnime } from '@/utils/anime-adapter';