Skip to content

Commit

Permalink
Fixed Lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Yimiika committed Jul 22, 2024
1 parent 59222cf commit dd00a5f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions app/components/Breadcrumb/Breadcrumb.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ interface Page {
link: string;
}

interface BreadcrumbProps {
interface BreadcrumbProperties {
pages: Page[];
}

const Breadcrumb: React.FC<BreadcrumbProps> = ({ pages }) => {
const Breadcrumb: React.FC<BreadcrumbProperties> = ({ pages }) => {
return (
<nav aria-label="breadcrumb" className="flex items-center">
{pages.map((page, index) => (
Expand All @@ -22,7 +22,7 @@ const Breadcrumb: React.FC<BreadcrumbProps> = ({ pages }) => {
isCurrent={index === pages.length - 1}
/>
{index < pages.length - 1 && (
<span className="flex items-center mx-2">
<span className="mx-2 flex items-center">
<BreadcrumbSeparator />
</span>
)}
Expand Down
6 changes: 3 additions & 3 deletions app/components/Breadcrumb/BreadcrumbItem.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React from "react";
import { Link } from "@remix-run/react";
import React from "react";

interface BreadcrumbItemProps {
interface BreadcrumbItemProperties {
name: string;
link: string;
isCurrent: boolean;
}

const BreadcrumbItem: React.FC<BreadcrumbItemProps> = ({
const BreadcrumbItem: React.FC<BreadcrumbItemProperties> = ({
name,
link,
isCurrent,
Expand Down
4 changes: 2 additions & 2 deletions app/components/Breadcrumb/BreadcrumbProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from "react";
import { useLocation } from "@remix-run/react";
import React from "react";
import Breadcrumb from "./Breadcrumb";

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

View workflow job for this annotation

GitHub Actions / eslint

Insert `⏎`

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

View workflow job for this annotation

GitHub Actions / eslint

Insert `⏎`

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

const breadcrumbPages = pathnames.map((pathname: string, index: number) => {
const link = `/${pathnames.slice(0, index + 1).join("/")}`;
Expand Down
2 changes: 1 addition & 1 deletion app/components/Breadcrumb/BreadcrumbSeparator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ const BreadcrumbSeparator: React.FC = () => (
</svg>
);

export default BreadcrumbSeparator;
export default BreadcrumbSeparator;

Check failure on line 18 in app/components/Breadcrumb/BreadcrumbSeparator.tsx

View workflow job for this annotation

GitHub Actions / eslint

Insert `⏎`

Check failure on line 18 in app/components/Breadcrumb/BreadcrumbSeparator.tsx

View workflow job for this annotation

GitHub Actions / eslint

Insert `⏎`

0 comments on commit dd00a5f

Please sign in to comment.