From 087bb8527c71539d491fa9aa4ba7c38f15358742 Mon Sep 17 00:00:00 2001 From: Hugo Lextrait Date: Tue, 3 Dec 2024 11:22:06 +0100 Subject: [PATCH] lint --- .../_merkl.opportunity.$chain.$type.$id.tsx | 33 ++++--------------- 1 file changed, 7 insertions(+), 26 deletions(-) diff --git a/src/routes/_merkl.opportunity.$chain.$type.$id.tsx b/src/routes/_merkl.opportunity.$chain.$type.$id.tsx index f2f38b23..e08112a1 100644 --- a/src/routes/_merkl.opportunity.$chain.$type.$id.tsx +++ b/src/routes/_merkl.opportunity.$chain.$type.$id.tsx @@ -1,9 +1,5 @@ import type { Opportunity } from "@angleprotocol/merkl-api"; -import { - type LoaderFunctionArgs, - type MetaFunction, - json, -} from "@remix-run/node"; +import { type LoaderFunctionArgs, type MetaFunction, json } from "@remix-run/node"; import { Meta, Outlet, useLoaderData } from "@remix-run/react"; import { useMemo } from "react"; import { ChainService } from "src/api/services/chain.service"; @@ -13,9 +9,7 @@ import Tag from "src/components/element/Tag"; import { ErrorHeading } from "src/components/layout/ErrorHeading"; import useOpportunity from "src/hooks/resources/useOpportunity"; -export async function loader({ - params: { id, type, chain: chainId }, -}: LoaderFunctionArgs) { +export async function loader({ params: { id, type, chain: chainId } }: LoaderFunctionArgs) { if (!chainId || !id || !type) throw ""; const chain = await ChainService.get({ search: chainId }); @@ -59,17 +53,11 @@ export default function Index() { if (str.includes("-")) return str .split("-") - .flatMap((s, i, arr) => [ - s, - i !== arr.length - 1 && -, - ]); + .flatMap((s, i, arr) => [s, i !== arr.length - 1 && -]); if (str.includes("/")) return str .split("/") - .flatMap((s, i, arr) => [ - s, - i !== arr.length - 1 && /, - ]); + .flatMap((s, i, arr) => [s, i !== arr.length - 1 && /]); return [{str}]; }) .flatMap((str, index, arr) => [str, index !== arr.length - 1 && " "]); @@ -79,7 +67,7 @@ export default function Index() { <> ({ src: t.icon }))} + icons={opportunity.tokens.map(t => ({ src: t.icon }))} navigation={{ label: "Back to opportunities", link: "/" }} title={styleName} description={description} @@ -87,15 +75,8 @@ export default function Index() { { label: "Overview", link }, { label: "Leaderboard", link: `${link}/leaderboard` }, ]} - tags={tags.map((tag) => ( - - ))} - opportunity={opportunity} - > + tags={tags.map(tag => )} + opportunity={opportunity}>