Skip to content

Commit

Permalink
feat: adjust linting
Browse files Browse the repository at this point in the history
  • Loading branch information
yellowCrimsonGator committed Oct 22, 2024
1 parent 6f59ba4 commit f59df7f
Show file tree
Hide file tree
Showing 27 changed files with 118 additions and 118 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"build": "env-cmd -e mainnet -r ./src/network-config.json next build",
"build-testnet": "env-cmd -e testnet -r ./src/network-config.json next build",
"start": "next start",
"lint": "next lint",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"lint-fix": "yarn lint --fix"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/app/(index)/Apps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const Apps = ({ allApps, topApps }: { allApps: any[]; topApps: any[] }) => {

return (
<div className="mt-8 w-full">
<div className="-mx-4 flex items-center gap-2 overflow-x-auto px-4 hide-scrollbar sm:mx-0 sm:flex-wrap sm:justify-center sm:overflow-hidden sm:px-0">
<div className="sm:mx-0 sm:flex-wrap sm:justify-center sm:overflow-hidden sm:px-0 -mx-4 flex items-center gap-2 overflow-x-auto px-4 hide-scrollbar">
<Button
className="flex-shrink-0"
onClick={() => setActiveCategory("trending")}
Expand Down
8 changes: 4 additions & 4 deletions src/app/(index)/ConnectWalletButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,16 @@ const ConnectWalletButton = () => {
}, [selector]);

return !!accountId ? (
<div className="flex justify-center sm:justify-start">
<div className="sm:justify-start flex justify-center">
<Menu as="div" className="relative">
<MenuButton className="flex h-10 items-center justify-center gap-2 rounded-full border border-sand-6 bg-sand-3 py-1.5 pl-1.5 pr-3 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-sand-12">
{({ active }) => (
<>
<Avatar inputString={ethWalletAvatarInputFormatter(accountId)} />
<div className="text-sm font-semibold text-sand-12 sm:hidden">
<div className="sm:hidden text-sm font-semibold text-sand-12">
{midTruncate(accountId)}
</div>
<div className="hidden select-none text-sm font-semibold text-sand-12 sm:block">
<div className="sm:block hidden select-none text-sm font-semibold text-sand-12">
{midTruncate(accountId)}
</div>
<ChevronDownIcon
Expand Down Expand Up @@ -111,7 +111,7 @@ const ConnectWalletButton = () => {
</Menu>
</div>
) : (
<div className="flex flex-col gap-2 sm:flex-row">
<div className="sm:flex-row flex flex-col gap-2">
<Button
size="sm"
onClick={() => {
Expand Down
10 changes: 5 additions & 5 deletions src/app/(index)/DevDocs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { DevDocsIcon, ArrowSquareOut } from "@/icons";

const DevDocs = async () => {
return (
<div className="relative mx-auto flex w-full justify-between overflow-hidden rounded-2xl bg-sand-1 p-4 shadow-custom-lg ring-1 ring-black/[0.03] sm:p-6 md:max-w-lg lg:max-w-none">
<DevDocsIcon className="absolute right-10 top-1/2 h-[230px] w-[230px] -translate-y-1/2 text-sand-5 opacity-50 sm:opacity-100" />
<div className="relative ml-2 max-w-80 py-4 sm:ml-4 sm:py-6">
<h3 className="font-sans text-2xl font-bold leading-[1.3] text-sand-12 sm:text-3xl">
<div className="sm:p-6 md:max-w-lg lg:max-w-none relative mx-auto flex w-full justify-between overflow-hidden rounded-2xl bg-sand-1 p-4 shadow-custom-lg ring-1 ring-black/[0.03]">
<DevDocsIcon className="sm:opacity-100 absolute right-10 top-1/2 h-[230px] w-[230px] -translate-y-1/2 text-sand-5 opacity-50" />
<div className="sm:ml-4 sm:py-6 relative ml-2 max-w-80 py-4">
<h3 className="sm:text-3xl font-sans text-2xl font-bold leading-[1.3] text-sand-12">
NEAR developer? Start here.
</h3>
<p className="mt-2 text-base leading-normal tracking-wider text-sand-12 sm:mt-3.5">
<p className="sm:mt-3.5 mt-2 text-base leading-normal tracking-wider text-sand-12">
Learn how to integrate Ethereum Wallets to Near DApps.
</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/app/(index)/GetNearOptions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ArrowTopRightOnSquareIcon } from "@heroicons/react/20/solid";
import { Fragment } from "react";

const GetNearOptions = () => (
<TabGroup className="mt-6 w-full sm:mt-8">
<TabGroup className="sm:mt-8 mt-6 w-full">
<TabList className="grid grid-cols-2 gap-2">
{["Bridge", "Onramps"].map((tab) => (
<Tab key={tab} as={Fragment}>
Expand Down
42 changes: 21 additions & 21 deletions src/app/(index)/LearnSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,22 +96,22 @@ const Link = ({
href={link}
target="_blank"
rel="noopener noreferrer"
className="block rounded-2xl border-2 border-sand-dark-7 p-6 hover:bg-sand-dark-5 focus:outline-sand-dark-11 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 sm:p-10"
className="sm:p-10 block rounded-2xl border-2 border-sand-dark-7 p-6 hover:bg-sand-dark-5 focus:outline-sand-dark-11 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2"
>
{imgUrl ? (
<Image
height={72}
width={72}
src={imgUrl}
className="h-14 w-14 overflow-hidden rounded-full object-contain sm:h-18 sm:w-18"
className="sm:h-18 sm:w-18 h-14 w-14 overflow-hidden rounded-full object-contain"
alt=""
/>
) : (
<div className="flex h-14 w-14 items-center justify-center rounded-full bg-sand-dark-7 sm:h-18 sm:w-18">
<Icon className="h-6 w-6 text-sand-dark-12 sm:h-8 sm:w-8" />
<div className="sm:h-18 sm:w-18 flex h-14 w-14 items-center justify-center rounded-full bg-sand-dark-7">
<Icon className="sm:h-8 sm:w-8 h-6 w-6 text-sand-dark-12" />
</div>
)}
<h4 className="mt-4 font-sans text-xl leading-[1.3] tracking-wide text-sand-dark-12 sm:mt-6">
<h4 className="sm:mt-6 mt-4 font-sans text-xl leading-[1.3] tracking-wide text-sand-dark-12">
{title}
</h4>
<p className="mt-1.5 text-sm leading-normal tracking-wider text-sand-dark-11">
Expand All @@ -122,35 +122,35 @@ const Link = ({

const LearnSection = () => {
return (
<section className="!mt-0 bg-sand-dark-1 py-20 sm:py-28">
<section className="sm:py-28 !mt-0 bg-sand-dark-1 py-20">
<Container>
<h2 className="text-center font-sans text-2xl font-medium leading-[1.3] text-sand-dark-12 sm:text-[42px]">
<h2 className="sm:text-[42px] text-center font-sans text-2xl font-medium leading-[1.3] text-sand-dark-12">
Learn, connect & collaborate.
</h2>
<p className="mx-auto mt-2 max-w-md text-center text-base leading-normal tracking-wider text-sand-dark-12 sm:mt-4">
<p className="sm:mt-4 mx-auto mt-2 max-w-md text-center text-base leading-normal tracking-wider text-sand-dark-12">
Join a vibrant community of innovators and builders creating a more
open web.
</p>
<div className="mt-10 space-y-5">
<div className="rounded-2xl bg-sand-dark-4 px-4 py-8 sm:p-10">
<div className="sm:p-10 rounded-2xl bg-sand-dark-4 px-4 py-8">
<div className="flex items-center gap-x-4">
<BookPageIcon className="h-7 w-7 text-green-10 sm:h-8 sm:w-8" />
<h3 className="font-sans text-2xl font-medium leading-[1.3] text-green-10 sm:text-3xl">
<BookPageIcon className="sm:h-8 sm:w-8 h-7 w-7 text-green-10" />
<h3 className="sm:text-3xl font-sans text-2xl font-medium leading-[1.3] text-green-10">
Learn
</h3>
</div>
<div className="mt-6 grid gap-5 sm:mt-10 md:grid-cols-3">
<div className="sm:mt-10 md:grid-cols-3 mt-6 grid gap-5">
{links.learn.map((item) => (
<Link key={item.title} {...item} />
))}
</div>
</div>

<div className="rounded-2xl bg-sand-dark-4 px-4 py-8 sm:p-10">
<div className="flex flex-col items-start gap-y-4 sm:flex-row sm:items-center sm:justify-between">
<div className="sm:p-10 rounded-2xl bg-sand-dark-4 px-4 py-8">
<div className="sm:flex-row sm:items-center sm:justify-between flex flex-col items-start gap-y-4">
<div className="flex items-center gap-x-4">
<UsersIcon className="h-7 w-7 text-cyan-10 sm:h-8 sm:w-8" />
<h3 className="font-sans text-2xl font-medium leading-[1.3] text-cyan-10 sm:text-3xl">
<UsersIcon className="sm:h-8 sm:w-8 h-7 w-7 text-cyan-10" />
<h3 className="sm:text-3xl font-sans text-2xl font-medium leading-[1.3] text-cyan-10">
Community
</h3>
</div>
Expand All @@ -165,21 +165,21 @@ const LearnSection = () => {
<ArrowRightIcon className="h-5 w-5 text-sand-10" />
</Button>
</div>
<div className="mt-6 grid gap-5 sm:mt-10 md:grid-cols-3">
<div className="sm:mt-10 md:grid-cols-3 mt-6 grid gap-5">
{links.community.map((item) => (
<Link key={item.title} {...item} />
))}
</div>
</div>

<div className="rounded-2xl bg-sand-dark-4 px-4 py-8 sm:p-10">
<div className="sm:p-10 rounded-2xl bg-sand-dark-4 px-4 py-8">
<div className="flex items-center gap-x-4">
<UsersIcon className="h-7 w-7 text-violet-6 sm:h-8 sm:w-8" />
<h3 className="font-sans text-2xl font-medium leading-[1.3] text-violet-6 sm:text-3xl">
<UsersIcon className="sm:h-8 sm:w-8 h-7 w-7 text-violet-6" />
<h3 className="sm:text-3xl font-sans text-2xl font-medium leading-[1.3] text-violet-6">
News
</h3>
</div>
<div className="mt-6 grid gap-5 sm:mt-10 md:grid-cols-3">
<div className="sm:mt-10 md:grid-cols-3 mt-6 grid gap-5">
{links.news.map((item) => (
<Link key={item.title} {...item} />
))}
Expand Down
8 changes: 4 additions & 4 deletions src/app/(index)/WalletsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ const WalletList = ({ wallets }: { wallets: any[] }) => {

const WalletsList = () => {
return (
<div className="relative w-full divide-y divide-black/10 border-t border-black/15 bg-[#66DC96] xl:grid xl:grid-cols-2 xl:divide-x xl:divide-y-0">
<div className="flex flex-col items-center px-4 py-6 sm:px-5 md:p-7">
<div className="xl:grid xl:grid-cols-2 xl:divide-x xl:divide-y-0 relative w-full divide-y divide-black/10 border-t border-black/15 bg-[#66DC96]">
<div className="sm:px-5 md:p-7 flex flex-col items-center px-4 py-6">
<div className="flex items-center gap-3">
<div className="flex h-8 w-8 items-center justify-center rounded-full bg-[#041417]">
<NearLogo className="h-3.5 w-3.5 text-white" />
Expand All @@ -91,7 +91,7 @@ const WalletsList = () => {
<WalletList wallets={nearWallets} />
</div>

<div className="relative flex flex-col items-center px-4 py-6 sm:px-5 md:p-7">
<div className="sm:px-5 md:p-7 relative flex flex-col items-center px-4 py-6">
<div className="flex items-center gap-3">
<EthereumLogo className="h-8 w-8" />
<h3 className="font-sans text-xl font-medium leading-[1.3] tracking-wide text-green-12">
Expand All @@ -102,7 +102,7 @@ const WalletsList = () => {
<WalletList wallets={ethereumWallets} />

<div
className="absolute left-1/2 top-0 z-10 flex h-13 w-13 -translate-x-1/2 -translate-y-1/2 items-center justify-center border-none bg-[#66DC96] text-base font-semibold uppercase leading-normal tracking-wider text-green-11 xl:left-0 xl:top-1/2"
className="xl:left-0 xl:top-1/2 absolute left-1/2 top-0 z-10 flex h-13 w-13 -translate-x-1/2 -translate-y-1/2 items-center justify-center border-none bg-[#66DC96] text-base font-semibold uppercase leading-normal tracking-wider text-green-11"
aria-hidden="true"
>
or
Expand Down
Loading

0 comments on commit f59df7f

Please sign in to comment.