From 140fbc522c3f44351953af0e4648d9ad92fc32e6 Mon Sep 17 00:00:00 2001 From: Feng-09 Date: Sun, 25 Aug 2024 13:46:36 +0100 Subject: [PATCH] Fix: lint errors --- src/app/(landing-routes)/blog/page.tsx | 5 ++++- .../(settings)/settings/_components/layout/sidebar/index.tsx | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/app/(landing-routes)/blog/page.tsx b/src/app/(landing-routes)/blog/page.tsx index 06632fc08..1a41ee77c 100644 --- a/src/app/(landing-routes)/blog/page.tsx +++ b/src/app/(landing-routes)/blog/page.tsx @@ -9,7 +9,6 @@ import { getApiUrl } from "~/actions/getApiUrl"; import CustomButton from "~/components/common/common-button/common-button"; import HeroSection from "~/components/extDynamicPages/blogCollection/BlogPageHero"; import BlogCard from "~/components/layouts/BlogCards"; -import { useToast } from "~/components/ui/use-toast"; import { Pagination, PaginationContent, @@ -18,6 +17,7 @@ import { PaginationNext, PaginationPrevious, } from "~/components/ui/pagination"; +import { useToast } from "~/components/ui/use-toast"; const BlogHome = () => { const [isLoading, setIsLoading] = useState(true); @@ -49,6 +49,7 @@ const BlogHome = () => { }, }); const data = response.data; + setData(response.data); setBlogPost(data); toast({ title: @@ -73,6 +74,8 @@ const BlogHome = () => { : "An unknown error occurred", variant: "destructive", }); + } finally { + setIsLoading(false); } } fetchBlog(); diff --git a/src/app/dashboard/(admin)/admin/(settings)/settings/_components/layout/sidebar/index.tsx b/src/app/dashboard/(admin)/admin/(settings)/settings/_components/layout/sidebar/index.tsx index d639a3af5..eaf49d6b7 100644 --- a/src/app/dashboard/(admin)/admin/(settings)/settings/_components/layout/sidebar/index.tsx +++ b/src/app/dashboard/(admin)/admin/(settings)/settings/_components/layout/sidebar/index.tsx @@ -105,7 +105,10 @@ const SettingsSidebar: FC = ({ sideNavitems = sideItems }) => { return (
-
router.push("/dashboard")}> +
router.push("/dashboard")} + >

Settings