Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
indaviande committed Dec 17, 2024
1 parent 87cf6ed commit 7efcc3b
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 108 deletions.
100 changes: 20 additions & 80 deletions merkl.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,92 +48,32 @@ export default createConfig({
deposit: false,
themes: {
ignite: {
base: createColoring(
["#2A35BD", "#BFFF37", "#FFFFFF"],
["#2A35BD", "#BFFF37", "#FFFFFF"]
),
info: createColoring(
["#2ABDFF", "#2ABDFF", "#131620"],
["#FFFFFF", "#40B66B", "white"]
),
good: createColoring(
["#40B66B", "#40B66B", "#131620"],
["#FFFFFF", "#40B66B", "white"]
),
warn: createColoring(
["#ff9600", "#ff9600", "#131620"],
["#FFFFFF", "#40B66B", "white"]
),
harm: createColoring(
["#d22e14", "#d22e14", "#131620"],
["#FFFFFF", "#40B66B", "white"]
),
base: createColoring(["#2A35BD", "#BFFF37", "#FFFFFF"], ["#2A35BD", "#BFFF37", "#FFFFFF"]),
info: createColoring(["#2ABDFF", "#2ABDFF", "#131620"], ["#FFFFFF", "#40B66B", "white"]),
good: createColoring(["#40B66B", "#40B66B", "#131620"], ["#FFFFFF", "#40B66B", "white"]),
warn: createColoring(["#ff9600", "#ff9600", "#131620"], ["#FFFFFF", "#40B66B", "white"]),
harm: createColoring(["#d22e14", "#d22e14", "#131620"], ["#FFFFFF", "#40B66B", "white"]),
},
merkl: {
base: createColoring(
["#1755F4", "#FF7900", "#0D1530"],
["#1755F4", "#FF7900", "#FFFFFF"]
),
info: createColoring(
["#2ABDFF", "#2ABDFF", "#131620"],
["#FFFFFF", "#40B66B", "white"]
),
good: createColoring(
["#40B66B", "#40B66B", "#131620"],
["#FFFFFF", "#40B66B", "white"]
),
warn: createColoring(
["#ff9600", "#ff9600", "#131620"],
["#FFFFFF", "#40B66B", "white"]
),
harm: createColoring(
["#d22e14", "#d22e14", "#131620"],
["#FFFFFF", "#40B66B", "white"]
),
base: createColoring(["#1755F4", "#FF7900", "#0D1530"], ["#1755F4", "#FF7900", "#FFFFFF"]),
info: createColoring(["#2ABDFF", "#2ABDFF", "#131620"], ["#FFFFFF", "#40B66B", "white"]),
good: createColoring(["#40B66B", "#40B66B", "#131620"], ["#FFFFFF", "#40B66B", "white"]),
warn: createColoring(["#ff9600", "#ff9600", "#131620"], ["#FFFFFF", "#40B66B", "white"]),
harm: createColoring(["#d22e14", "#d22e14", "#131620"], ["#FFFFFF", "#40B66B", "white"]),
},
backoffice: {
base: createColoring(
["#8B8D98", "#9984D2", "#000000"],
["#8B8D98", "#9984D2", "#FFFFFF"]
),
info: createColoring(
["#2ABDFF", "#2ABDFF", "#131620"],
["#FFFFFF", "#40B66B", "white"]
),
good: createColoring(
["#40B66B", "#40B66B", "#131620"],
["#FFFFFF", "#40B66B", "white"]
),
warn: createColoring(
["#ff9600", "#ff9600", "#131620"],
["#FFFFFF", "#40B66B", "white"]
),
harm: createColoring(
["#d22e14", "#d22e14", "#131620"],
["#FFFFFF", "#40B66B", "white"]
),
base: createColoring(["#8B8D98", "#9984D2", "#000000"], ["#8B8D98", "#9984D2", "#FFFFFF"]),
info: createColoring(["#2ABDFF", "#2ABDFF", "#131620"], ["#FFFFFF", "#40B66B", "white"]),
good: createColoring(["#40B66B", "#40B66B", "#131620"], ["#FFFFFF", "#40B66B", "white"]),
warn: createColoring(["#ff9600", "#ff9600", "#131620"], ["#FFFFFF", "#40B66B", "white"]),
harm: createColoring(["#d22e14", "#d22e14", "#131620"], ["#FFFFFF", "#40B66B", "white"]),
},
puffer: {
base: createColoring(
["#2A35BD", "#BFFF37", "#FFFFFF"],
["#2A35BD", "#BFFF37", "#FFFFFF"]
),
info: createColoring(
["#2ABDFF", "#2ABDFF", "#131620"],
["#FFFFFF", "#40B66B", "white"]
),
good: createColoring(
["#40B66B", "#40B66B", "#131620"],
["#FFFFFF", "#40B66B", "white"]
),
warn: createColoring(
["#ff9600", "#ff9600", "#131620"],
["#FFFFFF", "#40B66B", "white"]
),
harm: createColoring(
["#d22e14", "#d22e14", "#131620"],
["#FFFFFF", "#40B66B", "white"]
),
base: createColoring(["#2A35BD", "#BFFF37", "#FFFFFF"], ["#2A35BD", "#BFFF37", "#FFFFFF"]),
info: createColoring(["#2ABDFF", "#2ABDFF", "#131620"], ["#FFFFFF", "#40B66B", "white"]),
good: createColoring(["#40B66B", "#40B66B", "#131620"], ["#FFFFFF", "#40B66B", "white"]),
warn: createColoring(["#ff9600", "#ff9600", "#131620"], ["#FFFFFF", "#40B66B", "white"]),
harm: createColoring(["#d22e14", "#d22e14", "#131620"], ["#FFFFFF", "#40B66B", "white"]),
},
},
sizing: {
Expand Down
39 changes: 11 additions & 28 deletions src/components/composite/Hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,34 +50,24 @@ export default function Hero({
<OverrideTheme mode="light">
<Group
className={`${
location?.pathname === "/" ||
location?.pathname === "/opportunities"
? "bg-cover"
: "bg-main-6"
location?.pathname === "/" || location?.pathname === "/opportunities" ? "bg-cover" : "bg-main-6"
} flex-row justify-between bg-no-repeat xl:aspect-auto xl:min-h-[350px] aspect-[1440/300]`}
style={{
backgroundImage:
location?.pathname === "/" ||
location?.pathname === "/opportunities"
location?.pathname === "/" || location?.pathname === "/opportunities"
? `url('${config.images.hero}')`
: "none",
}}
>
}}>
<Container>
<Group className="flex-col h-full py-xl gap-xl lg:gap-xs">
<Group className="items-center" size="sm">
<Button to={navigation?.link ?? "/"} look="soft" bold size="xs">
Home
</Button>
{breadcrumbs?.map((breadcrumb) => {
{breadcrumbs?.map(breadcrumb => {
if (breadcrumb.component) return <>{breadcrumb.component}</>;
return (
<Button
key={breadcrumb.link}
to={breadcrumb.link}
look="soft"
size="xs"
>
<Button key={breadcrumb.link} to={breadcrumb.link} look="soft" size="xs">
<Icon remix="RiArrowRightSLine" />
{breadcrumb.name}
</Button>
Expand All @@ -91,14 +81,14 @@ export default function Hero({
{!!icons && (
<Icons size="lg">
{icons?.length > 1
? icons?.map((icon) => (
? icons?.map(icon => (
<Icon
className="hidden md:block text-main-12 !w-lg*4 !h-lg*4"
key={`${Object.values(icon)}`}
{...icon}
/>
))
: icons?.map((icon) => (
: icons?.map(icon => (
<Icon
className="hidden md:block text-main-12 !w-xl*4 !h-xl*4"
key={`${Object.values(icon)}`}
Expand All @@ -121,11 +111,8 @@ export default function Hero({
{!!tags && <Group className="mb-lg">{tags}</Group>}
</Group>
{!!sideDatas && (
<Group
className="w-full lg:w-auto lg:flex-col mr-xl*2"
size="lg"
>
{sideDatas.map((data) => (
<Group className="w-full lg:w-auto lg:flex-col mr-xl*2" size="lg">
{sideDatas.map(data => (
<Group key={data.key} className="flex-col" size="xs">
<Text size={4} className="!text-main-12">
{data.data}
Expand All @@ -150,11 +137,7 @@ export default function Hero({
);
}

export function defaultHeroSideDatas(
count: number,
maxApr: number,
dailyRewards: number
) {
export function defaultHeroSideDatas(count: number, maxApr: number, dailyRewards: number) {
return [
!!count && {
data: (
Expand Down Expand Up @@ -183,5 +166,5 @@ export function defaultHeroSideDatas(
label: "Max APR",
key: crypto.randomUUID(),
},
].filter((data) => !!data);
].filter(data => !!data);
}

0 comments on commit 7efcc3b

Please sign in to comment.