Skip to content

Commit

Permalink
Prettified Code!
Browse files Browse the repository at this point in the history
  • Loading branch information
o-az authored and actions-user committed Feb 18, 2022
1 parent 12da77b commit cd6deaf
Show file tree
Hide file tree
Showing 56 changed files with 537 additions and 490 deletions.
4 changes: 2 additions & 2 deletions scripts/wdyr.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ if (process.env.NODE_ENV === 'development') {
if (typeof window !== 'undefined') {
const whyDidYouRender = require('@welldone-software/why-did-you-render');
whyDidYouRender(React, {
trackAllPureComponents: true
trackAllPureComponents: true,
});
}
}
}
9 changes: 6 additions & 3 deletions src/components/connect-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ export const ConnectWalletModal = ({
enterTo="opacity-100"
leave="ease-in duration-200"
leaveFrom="opacity-100"
leaveTo="opacity-0">
leaveTo="opacity-0"
>
<Dialog.Overlay className="fixed inset-0 bg-[rgba(18,19,23,0.7)]" />
</Transition.Child>
<span className="inline-block h-screen align-middle" aria-hidden="true">
Expand All @@ -34,11 +35,13 @@ export const ConnectWalletModal = ({
enterTo="opacity-100 scale-100"
leave="ease-in duration-200"
leaveFrom="opacity-100 scale-100"
leaveTo="opacity-0 scale-95">
leaveTo="opacity-0 scale-95"
>
<div className="inline-block w-full max-w-[18rem] origin-top-right divide-gray-100 rounded-md border bg-[rgb(18,18,24)] p-[0.1rem] font-semibold leading-6 text-gray-300 shadow-[0_4px_30px_rgba(0,0,0,0.1)] ring-1 ring-black ring-opacity-5 backdrop-blur-md focus:outline-none md:max-w-[30rem]">
<Dialog.Title
as="h3"
className="pt-6 text-lg font-semibold leading-7 tracking-wide text-gray-200 antialiased">
className="pt-6 text-lg font-semibold leading-7 tracking-wide text-gray-200 antialiased"
>
CONNECTION METHOD
</Dialog.Title>
<div className="flex h-full w-full justify-between divide-x pt-6 pb-5">
Expand Down
1 change: 0 additions & 1 deletion src/components/full-page-loading-spinner.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import * as React from 'react';


export const FullPageLoadingSpinner = () => (
<div className="flex min-h-screen items-center justify-center">
<style jsx>
Expand Down
29 changes: 15 additions & 14 deletions src/components/icons/copy-icon.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
import * as React from 'react';

export const CopyIcon = ({ className = "h-5 w-5" }: { className?: string }) => (
<svg
xmlns="http://www.w3.org/2000/svg"
className={className}
fill="none"
viewBox="0 0 24 24"
stroke="currentColor">
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"
/>
</svg>
export const CopyIcon = ({ className = 'h-5 w-5' }: { className?: string }) => (
<svg
xmlns="http://www.w3.org/2000/svg"
className={className}
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"
/>
</svg>
);
9 changes: 6 additions & 3 deletions src/components/icons/crypto-wallets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,15 @@ function WalletConnect() {
height="185px"
viewBox="0 0 300 185"
version="1.1"
className="h-20 w-20 md:h-12 md:w-12">
className="h-20 w-20 md:h-12 md:w-12"
>
<defs></defs>
<g id="Page-1" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
<g id="walletconnect-logo-alt" fill="#3B99FC" fillRule="nonzero">
<path
d="M61.4385429,36.2562612 C110.349767,-11.6319051 189.65053,-11.6319051 238.561752,36.2562612 L244.448297,42.0196786 C246.893858,44.4140867 246.893858,48.2961898 244.448297,50.690599 L224.311602,70.406102 C223.088821,71.6033071 221.106302,71.6033071 219.883521,70.406102 L211.782937,62.4749541 C177.661245,29.0669724 122.339051,29.0669724 88.2173582,62.4749541 L79.542302,70.9685592 C78.3195204,72.1657633 76.337001,72.1657633 75.1142214,70.9685592 L54.9775265,51.2530561 C52.5319653,48.8586469 52.5319653,44.9765439 54.9775265,42.5821357 L61.4385429,36.2562612 Z M280.206339,77.0300061 L298.128036,94.5769031 C300.573585,96.9713 300.573599,100.85338 298.128067,103.247793 L217.317896,182.368927 C214.872352,184.763353 210.907314,184.76338 208.461736,182.368989 C208.461726,182.368979 208.461714,182.368967 208.461704,182.368957 L151.107561,126.214385 C150.496171,125.615783 149.504911,125.615783 148.893521,126.214385 C148.893517,126.214389 148.893514,126.214393 148.89351,126.214396 L91.5405888,182.368927 C89.095052,184.763359 85.1300133,184.763399 82.6844276,182.369014 C82.6844133,182.369 82.684398,182.368986 82.6843827,182.36897 L1.87196327,103.246785 C-0.573596939,100.852377 -0.573596939,96.9702735 1.87196327,94.5758653 L19.7936929,77.028998 C22.2392531,74.6345898 26.2042918,74.6345898 28.6498531,77.028998 L86.0048306,133.184355 C86.6162214,133.782957 87.6074796,133.782957 88.2188704,133.184355 C88.2188796,133.184346 88.2188878,133.184338 88.2188969,133.184331 L145.571,77.028998 C148.016505,74.6345347 151.981544,74.6344449 154.427161,77.028798 C154.427195,77.0288316 154.427229,77.0288653 154.427262,77.028899 L211.782164,133.184331 C212.393554,133.782932 213.384814,133.782932 213.996204,133.184331 L271.350179,77.0300061 C273.79574,74.6355969 277.760778,74.6355969 280.206339,77.0300061 Z"
id="WalletConnect"></path>
id="WalletConnect"
></path>
</g>
</g>
</svg>
Expand All @@ -57,7 +59,8 @@ function Metamask() {
x="0px"
y="0px"
viewBox="0 0 318.6 318.6"
className="h-20 w-20 md:h-12 md:w-12">
className="h-20 w-20 md:h-12 md:w-12"
>
<style jsx>
{`
.st0 {
Expand Down
1 change: 0 additions & 1 deletion src/components/icons/discord.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import * as React from 'react';


export const Discord = () => (
<svg
width="20"
Expand Down
23 changes: 12 additions & 11 deletions src/components/icons/down-arrow.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import * as React from 'react';

export const DownArrow = () => (
<svg
xmlns="http://www.w3.org/2000/svg"
className="m-auto mt-1 h-5 w-5 items-center text-center"
viewBox="0 0 20 20"
fill="currentColor">
<path
fillRule="evenodd"
d="M14.707 10.293a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 111.414-1.414L9 12.586V5a1 1 0 012 0v7.586l2.293-2.293a1 1 0 011.414 0z"
clipRule="evenodd"
/>
</svg>
<svg
xmlns="http://www.w3.org/2000/svg"
className="m-auto mt-1 h-5 w-5 items-center text-center"
viewBox="0 0 20 20"
fill="currentColor"
>
<path
fillRule="evenodd"
d="M14.707 10.293a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 111.414-1.414L9 12.586V5a1 1 0 012 0v7.586l2.293-2.293a1 1 0 011.414 0z"
clipRule="evenodd"
/>
</svg>
);
1 change: 0 additions & 1 deletion src/components/icons/github.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import * as React from 'react';


export const Github = () => (
<svg
width="20"
Expand Down
29 changes: 15 additions & 14 deletions src/components/icons/hashtag.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
import * as React from "react";
import * as React from 'react';

export const HashtagIcon = () => (
<svg
xmlns="http://www.w3.org/2000/svg"
className="w-[150%]"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor">
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={2}
d="M7 20l4-16m2 16l4-16M6 9h14M4 15h14"
/>
</svg>
<svg
xmlns="http://www.w3.org/2000/svg"
className="w-[150%]"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={2}
d="M7 20l4-16m2 16l4-16M6 9h14M4 15h14"
/>
</svg>
);
28 changes: 14 additions & 14 deletions src/components/icons/index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
export * from "./logout-icon";
export * from "./crypto-wallets";
export * from "./magic";
export * from "./ethereum";
export * from "./loading-spinner";
export * from "./twitter";
export * from "./github";
export * from "./link-icon";
export * from "./discord";
export * from "./down-arrow";
export * from "./red-heart";
export * from "./transparent-heart";
export * from "./hashtag";
export * from "./copy-icon";
export * from './logout-icon';
export * from './crypto-wallets';
export * from './magic';
export * from './ethereum';
export * from './loading-spinner';
export * from './twitter';
export * from './github';
export * from './link-icon';
export * from './discord';
export * from './down-arrow';
export * from './red-heart';
export * from './transparent-heart';
export * from './hashtag';
export * from './copy-icon';
3 changes: 2 additions & 1 deletion src/components/icons/link-icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ export const LinkIcon = () => (
xmlns="http://www.w3.org/2000/svg"
className="text-gray-500 hover:text-gray-100"
viewBox="0 0 20 20"
fill="currentColor">
fill="currentColor"
>
<path
fillRule="evenodd"
d="M12.586 4.586a2 2 0 112.828 2.828l-3 3a2 2 0 01-2.828 0 1 1 0 00-1.414 1.414 4 4 0 005.656 0l3-3a4 4 0 00-5.656-5.656l-1.5 1.5a1 1 0 101.414 1.414l1.5-1.5zm-5 5a2 2 0 012.828 0 1 1 0 101.414-1.414 4 4 0 00-5.656 0l-3 3a4 4 0 105.656 5.656l1.5-1.5a1 1 0 10-1.414-1.414l-1.5 1.5a2 2 0 11-2.828-2.828l3-3z"
Expand Down
19 changes: 10 additions & 9 deletions src/components/icons/red-heart.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import * as React from "react";
import * as React from 'react';
export const RedHeart = () => (
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 122.88 107.39"
className={`h-4 w-auto fill-red-700`}>
<defs></defs>
<title>red-heart</title>
<path d="M60.83,17.18c8-8.35,13.62-15.57,26-17C110-2.46,131.27,21.26,119.57,44.61c-3.33,6.65-10.11,14.56-17.61,22.32-8.23,8.52-17.34,16.87-23.72,23.2l-17.4,17.26L46.46,93.55C29.16,76.89,1,55.92,0,29.94-.63,11.74,13.73.08,30.25.29c14.76.2,21,7.54,30.58,16.89Z" />
</svg>
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 122.88 107.39"
className={`h-4 w-auto fill-red-700`}
>
<defs></defs>
<title>red-heart</title>
<path d="M60.83,17.18c8-8.35,13.62-15.57,26-17C110-2.46,131.27,21.26,119.57,44.61c-3.33,6.65-10.11,14.56-17.61,22.32-8.23,8.52-17.34,16.87-23.72,23.2l-17.4,17.26L46.46,93.55C29.16,76.89,1,55.92,0,29.94-.63,11.74,13.73.08,30.25.29c14.76.2,21,7.54,30.58,16.89Z" />
</svg>
);
12 changes: 6 additions & 6 deletions src/components/icons/transparent-heart.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as React from "react";
import * as React from 'react';

export const TransparentHeart = () => (
<svg className="h-5 w-auto fill-current" viewBox="0 0 24 24">
<g>
<path d="M12 21.638h-.014C9.403 21.59 1.95 14.856 1.95 8.478c0-3.064 2.525-5.754 5.403-5.754 2.29 0 3.83 1.58 4.646 2.73.814-1.148 2.354-2.73 4.645-2.73 2.88 0 5.404 2.69 5.404 5.755 0 6.376-7.454 13.11-10.037 13.157H12zM7.354 4.225c-2.08 0-3.903 1.988-3.903 4.255 0 5.74 7.034 11.596 8.55 11.658 1.518-.062 8.55-5.917 8.55-11.658 0-2.267-1.823-4.255-3.903-4.255-2.528 0-3.94 2.936-3.952 2.965-.23.562-1.156.562-1.387 0-.014-.03-1.425-2.965-3.954-2.965z"></path>
</g>
</svg>
<svg className="h-5 w-auto fill-current" viewBox="0 0 24 24">
<g>
<path d="M12 21.638h-.014C9.403 21.59 1.95 14.856 1.95 8.478c0-3.064 2.525-5.754 5.403-5.754 2.29 0 3.83 1.58 4.646 2.73.814-1.148 2.354-2.73 4.645-2.73 2.88 0 5.404 2.69 5.404 5.755 0 6.376-7.454 13.11-10.037 13.157H12zM7.354 4.225c-2.08 0-3.903 1.988-3.903 4.255 0 5.74 7.034 11.596 8.55 11.658 1.518-.062 8.55-5.917 8.55-11.658 0-2.267-1.823-4.255-3.903-4.255-2.528 0-3.94 2.936-3.952 2.965-.23.562-1.156.562-1.387 0-.014-.03-1.425-2.965-3.954-2.965z"></path>
</g>
</svg>
);
2 changes: 1 addition & 1 deletion src/components/icons/twitter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as React from 'react';
export const Twitter = ({
w = 6,
h = 6,
customStyle
customStyle,
}: {
w?: number;
h?: number;
Expand Down
4 changes: 2 additions & 2 deletions src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ export * from './loading-transaction';
export * from './media-tag';
export * from './sign-in-with-eth';
export * from './switch-network-toast';
export * from './full-page-loading-spinner'
export * from './profile-table-row'
export * from './full-page-loading-spinner';
export * from './profile-table-row';
57 changes: 29 additions & 28 deletions src/components/layouts/gallery.tsx
Original file line number Diff line number Diff line change
@@ -1,33 +1,34 @@
import dynamic from "next/dynamic";
import * as React from "react";
import type { NFT } from "@/types";
import { MediaComponent } from "@/components";
import dynamic from 'next/dynamic';
import * as React from 'react';
import type { NFT } from '@/types';
import { MediaComponent } from '@/components';

export const Gallery = ({ nfts }: { nfts: NFT[] }) => {
return (
<div className="bg-transparent">
<div className="mx-auto max-w-2xl lg:max-w-7xl">
<h2 className="sr-only">NFTs</h2>
return (
<div className="bg-transparent">
<div className="mx-auto max-w-2xl lg:max-w-7xl">
<h2 className="sr-only">NFTs</h2>

<div className="grid grid-cols-1 gap-y-6 gap-x-6 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 xl:gap-x-4">
{nfts.map((nft, idx) => {
return (
<a
key={idx}
href={`https://opensea.io/assets/${nft.contract_address}/${nft.token_id}`}
target="_blank"
rel="noreferrer"
className="group">
<div className="aspect-w-1 aspect-h-1 xl:aspect-w-7 xl:aspect-h-8 w-full overflow-hidden rounded-lg bg-gray-200">
<MediaComponent mediaUrl={nft.file_url} />
</div>
{/* <h3 className="mt-4 text-sm text-gray-700">{product.name}</h3>
<div className="grid grid-cols-1 gap-y-6 gap-x-6 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 xl:gap-x-4">
{nfts.map((nft, idx) => {
return (
<a
key={idx}
href={`https://opensea.io/assets/${nft.contract_address}/${nft.token_id}`}
target="_blank"
rel="noreferrer"
className="group"
>
<div className="aspect-w-1 aspect-h-1 xl:aspect-w-7 xl:aspect-h-8 w-full overflow-hidden rounded-lg bg-gray-200">
<MediaComponent mediaUrl={nft.file_url} />
</div>
{/* <h3 className="mt-4 text-sm text-gray-700">{product.name}</h3>
<p className="mt-1 text-lg font-medium text-gray-900">{product.price}</p> */}
</a>
);
})}
</div>
</div>
</div>
);
</a>
);
})}
</div>
</div>
</div>
);
};
15 changes: 10 additions & 5 deletions src/components/layouts/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ export const Header = () => {
className={clsx(
`flex flex-1 justify-center px-2 lg:ml-6 lg:justify-end`,
!authenticated && `lg:justify-center`
)}>
)}
>
<SearchBar />
</div>

Expand Down Expand Up @@ -105,7 +106,8 @@ export const Header = () => {
</div>
<a
className="flex rounded-sm text-sm text-white focus:outline-none focus:ring-2 focus:ring-white focus:ring-offset-2 focus:ring-offset-gray-600"
href="/api/auth/logout">
href="/api/auth/logout"
>
<span className="sr-only">Open user menu</span>
<LogoutIcon />
</a>
Expand All @@ -116,7 +118,8 @@ export const Header = () => {
className={clsx(
'h-3 w-3 rounded-full',
authenticated ? 'bg-green-300' : !!error ? 'bg-red-400' : 'bg-orange-200'
)}></span>
)}
></span>
</div>
</Menu>
</div>
Expand All @@ -130,7 +133,8 @@ export const Header = () => {
<Link shallow={true} key={item.name} href={item.href} passHref>
<Disclosure.Button
as="a"
className="block rounded-md py-2 px-3 text-base font-medium">
className="block rounded-md py-2 px-3 text-base font-medium"
>
{item.name}
</Disclosure.Button>
</Link>
Expand All @@ -150,7 +154,8 @@ export const Header = () => {
</div>
<button
type="button"
className="ml-auto flex-shrink-0 rounded-full bg-gray-700 p-1 text-gray-200 hover:text-white focus:outline-none focus:ring-2 focus:ring-white focus:ring-offset-2 focus:ring-offset-gray-600">
className="ml-auto flex-shrink-0 rounded-full bg-gray-700 p-1 text-gray-200 hover:text-white focus:outline-none focus:ring-2 focus:ring-white focus:ring-offset-2 focus:ring-offset-gray-600"
>
<span className="sr-only">View notifications</span>
<BellIcon className="h-6 w-6" aria-hidden="true" />
</button>
Expand Down
Loading

0 comments on commit cd6deaf

Please sign in to comment.