Skip to content

Commit

Permalink
Fixed type errors in the BreadcrumbProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
Yimiika committed Jul 22, 2024
1 parent a1e43ff commit 59222cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/components/Breadcrumb/BreadcrumbProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import Breadcrumb from "./Breadcrumb";

const BreadcrumbProvider: React.FC = () => {
const location = useLocation();
const pathnames = location.pathname.split("/").filter((x) => x);
const pathnames = location.pathname.split("/").filter((x: string) => x);

Check failure on line 7 in app/components/Breadcrumb/BreadcrumbProvider.tsx

View workflow job for this annotation

GitHub Actions / eslint

arrow function is equivalent to `Boolean`. Use `Boolean` directly

const breadcrumbPages = pathnames.map((pathname, index) => {
const breadcrumbPages = pathnames.map((pathname: string, index: number) => {
const link = `/${pathnames.slice(0, index + 1).join("/")}`;
return {
name: pathname.charAt(0).toUpperCase() + pathname.slice(1),
Expand Down

0 comments on commit 59222cf

Please sign in to comment.