Skip to content

Commit

Permalink
chore: update biome config (#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
derianrddev authored Feb 11, 2025
1 parent 57f87ee commit 4544a7a
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 64 deletions.
12 changes: 6 additions & 6 deletions apps/frontend/app/not-found.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import NotFound from "@/components/shared/not-found";

const GlobalNotFound = () => {
return (
<NotFound
title="Page Not Found"
description="The page you are looking for doesn’t exist or has been moved."
/>
);
return (
<NotFound
title="Page Not Found"
description="The page you are looking for doesn’t exist or has been moved."
/>
);
};

export default GlobalNotFound;
44 changes: 22 additions & 22 deletions apps/frontend/components/marketplace/products-not-found.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,36 @@
import { useTranslations } from "@/hooks/useTranslations";
import { PackageSearch } from "lucide-react";
import React, { type Dispatch, type SetStateAction } from "react";
import { Button } from "../ui/button";
import NotFound from "../shared/not-found";
import { Button } from "../ui/button";

type ProductsNotFoundProps = {
setPriceRange: Dispatch<SetStateAction<[number, number]>>;
setSelectedCategories: Dispatch<SetStateAction<string[]>>;
setPriceRange: Dispatch<SetStateAction<[number, number]>>;
setSelectedCategories: Dispatch<SetStateAction<string[]>>;
};

export default function ProductsNotFound({
setPriceRange,
setSelectedCategories,
setPriceRange,
setSelectedCategories,
}: ProductsNotFoundProps) {
const { t } = useTranslations();
const { t } = useTranslations();

const clearFilters = () => {
setPriceRange([0, 1500]);
setSelectedCategories([]);
};
const clearFilters = () => {
setPriceRange([0, 1500]);
setSelectedCategories([]);
};

return (
<section className="flex flex-col items-center justify-center space-y-4 mx-auto">
<NotFound
icon={PackageSearch}
title={t("common.noProducts.title")}
description={t("common.noProducts.description")}
/>
return (
<section className="flex flex-col items-center justify-center space-y-4 mx-auto">
<NotFound
icon={PackageSearch}
title={t("common.noProducts.title")}
description={t("common.noProducts.description")}
/>

<Button onClick={clearFilters}>
{t("common.noProducts.clearFilters")}
</Button>
</section>
);
<Button onClick={clearFilters}>
{t("common.noProducts.clearFilters")}
</Button>
</section>
);
}
24 changes: 12 additions & 12 deletions apps/frontend/components/products/not-found.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
"use client";

import { PackageX } from "lucide-react";
import { useTranslations } from "@/hooks/useTranslations";
import NotFound from "../shared/not-found";
import { PackageX } from "lucide-react";
import NotFound from "../shared/not-found";

const ProductNotFound = () => {
const { t } = useTranslations();
const { t } = useTranslations();

return (
<>
<NotFound
icon={PackageX}
title={t("common.notFound.title")}
description={t("common.notFound.description")}
/>
</>
);
return (
<>
<NotFound
icon={PackageX}
title={t("common.notFound.title")}
description={t("common.notFound.description")}
/>
</>
);
};

export default ProductNotFound;
46 changes: 23 additions & 23 deletions apps/frontend/components/shared/not-found.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,33 @@ import Link from "next/link";
import { Button } from "../ui/button";

type NotFoundProps = {
icon?: React.ElementType;
title: string;
description: string;
icon?: React.ElementType;
title: string;
description: string;
};

const NotFound = ({
icon: Icon = AlertCircle,
title,
description,
icon: Icon = AlertCircle,
title,
description,
}: NotFoundProps) => {
return (
<div className="flex flex-col items-center justify-center min-h-[calc(100vh-150px)] px-4">
<Icon className="h-24 w-24 text-muted-foreground mb-8" />
<h1 className="text-4xl font-bold mb-4">{title}</h1>
<p className="text-lg text-muted-foreground mb-8 text-center">
{description}
</p>
<div className="flex gap-4">
<Button asChild>
<Link href="/marketplace">Browse Marketplace</Link>
</Button>
<Button variant="outline" asChild>
<Link href="/">Go Home</Link>
</Button>
</div>
</div>
);
return (
<div className="flex flex-col items-center justify-center min-h-[calc(100vh-150px)] px-4">
<Icon className="h-24 w-24 text-muted-foreground mb-8" />
<h1 className="text-4xl font-bold mb-4">{title}</h1>
<p className="text-lg text-muted-foreground mb-8 text-center">
{description}
</p>
<div className="flex gap-4">
<Button asChild>
<Link href="/marketplace">Browse Marketplace</Link>
</Button>
<Button variant="outline" asChild>
<Link href="/">Go Home</Link>
</Button>
</div>
</div>
);
};

export default NotFound;
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"linter": {
"enabled": true,
"ignore": ["./components/ui/**"],
"ignore": ["./components/ui/**", "./hooks/use-toast.ts"],
"rules": {
"recommended": true,
"style": {
Expand Down

0 comments on commit 4544a7a

Please sign in to comment.