From 1100dca618618dd713735c5fd002941a8e42ba2d Mon Sep 17 00:00:00 2001 From: Melnyk Mykhailo Date: Wed, 24 Jan 2024 19:06:54 +0200 Subject: [PATCH] fix hooks imports according to hooks index file --- src/app/page.tsx | 3 +-- src/components/ui/toaster.tsx | 2 +- src/hooks/use-api.ts | 2 +- src/utils/api/metacom.ts | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index 8da1f04..f13b83a 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,8 +1,7 @@ 'use client' import { Button } from '@/components/ui/button' -import { useApi } from '@/hooks/use-api' -import { useToast } from '@/hooks/use-toast' +import { useApi, useToast } from '@/hooks' import { useApiContext } from '@/utils' const Home = () => { diff --git a/src/components/ui/toaster.tsx b/src/components/ui/toaster.tsx index c59f423..e575bd3 100644 --- a/src/components/ui/toaster.tsx +++ b/src/components/ui/toaster.tsx @@ -8,7 +8,7 @@ import { ToastTitle, ToastViewport, } from '@/components/ui/toast' -import { useToast } from '@/hooks/use-toast' +import { useToast } from '@/hooks' export function Toaster() { const { toasts } = useToast() diff --git a/src/hooks/use-api.ts b/src/hooks/use-api.ts index c5de7bc..8e54ae3 100644 --- a/src/hooks/use-api.ts +++ b/src/hooks/use-api.ts @@ -1,6 +1,6 @@ 'use client' -import { useToast } from '@/hooks/use-toast' +import { useToast } from '@/hooks' import { useCallback, useEffect, useRef, useState } from 'react' export const useApi = >( diff --git a/src/utils/api/metacom.ts b/src/utils/api/metacom.ts index 00c7333..bcbd1d4 100644 --- a/src/utils/api/metacom.ts +++ b/src/utils/api/metacom.ts @@ -1,7 +1,7 @@ 'use client' import { URL_PRODUCT_API } from '@/constants' -import { useToast } from '@/hooks/use-toast' +import { useToast } from '@/hooks' import { Metacom } from 'metacom' import { createContext,