diff --git a/apps/api/src/helpers/oembed/constructIframe.ts b/apps/api/src/helpers/oembed/constructIframe.ts index f616a6382..35cf5b445 100644 --- a/apps/api/src/helpers/oembed/constructIframe.ts +++ b/apps/api/src/helpers/oembed/constructIframe.ts @@ -1,5 +1,6 @@ -import type { Document } from 'linkedom/types/interface/document'; -import { COMMON_REGEX } from './regex'; +import type { Document } from 'linkedom/types/interface/document' + +import { COMMON_REGEX } from './regex' const ALLOWED_EMBEDS = [ 'youtube.com', diff --git a/apps/api/src/helpers/oembed/extractOgTags.ts b/apps/api/src/helpers/oembed/extractOgTags.ts index 6ee21a075..c91a10674 100644 --- a/apps/api/src/helpers/oembed/extractOgTags.ts +++ b/apps/api/src/helpers/oembed/extractOgTags.ts @@ -1,6 +1,6 @@ -import type { Document } from 'linkedom/types/interface/document'; +import type { Document } from 'linkedom/types/interface/document' -import constructIframe from './constructIframe'; +import constructIframe from './constructIframe' const extractOgTags = async (document: Document) => { const titleTag = document.querySelector('title') diff --git a/apps/api/src/index.ts b/apps/api/src/index.ts index 4a771eda2..f18fa067a 100644 --- a/apps/api/src/index.ts +++ b/apps/api/src/index.ts @@ -1,19 +1,19 @@ -import { Hono } from 'hono'; -import { cors } from 'hono/cors'; +import { Hono } from 'hono' +import { cors } from 'hono/cors' -import allowedTokens from './routes/allowed-tokens'; -import did from './routes/did'; -import gateway from './routes/gateway'; -import metadata from './routes/metadata'; -import oembed from './routes/oembed'; -import recommendations from './routes/recommendations'; -import signup from './routes/signup'; -import sts from './routes/sts'; -import tail from './routes/tail'; -import toggles from './routes/toggles'; -import tower from './routes/tower'; -import verified from './routes/verified'; -import views from './routes/views'; +import allowedTokens from './routes/allowed-tokens' +import did from './routes/did' +import gateway from './routes/gateway' +import metadata from './routes/metadata' +import oembed from './routes/oembed' +import recommendations from './routes/recommendations' +import signup from './routes/signup' +import sts from './routes/sts' +import tail from './routes/tail' +import toggles from './routes/toggles' +import tower from './routes/tower' +import verified from './routes/verified' +import views from './routes/views' const app = new Hono() diff --git a/apps/api/src/routes/oembed.ts b/apps/api/src/routes/oembed.ts index 1bc0c9c35..1d1d5534f 100644 --- a/apps/api/src/routes/oembed.ts +++ b/apps/api/src/routes/oembed.ts @@ -1,12 +1,12 @@ -import { zValidator } from '@hono/zod-validator'; -import { Hono } from 'hono'; -import { cache } from 'hono/cache'; -import { parseHTML } from 'linkedom'; -import { object, string } from 'zod'; +import { zValidator } from '@hono/zod-validator' +import { Hono } from 'hono' +import { cache } from 'hono/cache' +import { parseHTML } from 'linkedom' +import { object, string } from 'zod' -import { ERROR_MESSAGE } from '@/helpers/constants'; -import extractOgTags from '@/helpers/oembed/extractOgTags'; -import { COMMON_REGEX } from '@/helpers/oembed/regex'; +import { ERROR_MESSAGE } from '@/helpers/constants' +import extractOgTags from '@/helpers/oembed/extractOgTags' +import { COMMON_REGEX } from '@/helpers/oembed/regex' type Bindings = { LIVEPEER_API_TOKEN: string diff --git a/apps/api/src/routes/sts.ts b/apps/api/src/routes/sts.ts index 881da72f1..56c9f1855 100644 --- a/apps/api/src/routes/sts.ts +++ b/apps/api/src/routes/sts.ts @@ -1,7 +1,7 @@ -import { AssumeRoleCommand, STSClient } from '@aws-sdk/client-sts'; -import { Hono } from 'hono'; +import { AssumeRoleCommand, STSClient } from '@aws-sdk/client-sts' +import { Hono } from 'hono' -import { ERROR_MESSAGE } from '@/helpers/constants'; +import { ERROR_MESSAGE } from '@/helpers/constants' type Bindings = { EVER_ACCESS_KEY: string diff --git a/apps/api/src/routes/tower.ts b/apps/api/src/routes/tower.ts index 4536ffd83..d16817e99 100644 --- a/apps/api/src/routes/tower.ts +++ b/apps/api/src/routes/tower.ts @@ -1,12 +1,12 @@ -import { ALL_EVENTS } from '@dragverse/generic/events'; -import { zValidator } from '@hono/zod-validator'; -import { Hono } from 'hono'; -import UAParser from 'ua-parser-js'; -import type { z } from 'zod'; -import { any, object, string } from 'zod'; - -import { ERROR_MESSAGE } from '@/helpers/constants'; -import checkEventExistence from '@/helpers/tower/checkEventExistence'; +import { ALL_EVENTS } from '@dragverse/generic/events' +import { zValidator } from '@hono/zod-validator' +import { Hono } from 'hono' +import UAParser from 'ua-parser-js' +import type { z } from 'zod' +import { any, object, string } from 'zod' + +import { ERROR_MESSAGE } from '@/helpers/constants' +import checkEventExistence from '@/helpers/tower/checkEventExistence' type Bindings = { INGEST_REST_ENDPOINT: string diff --git a/apps/embed/src/components/Audio.tsx b/apps/embed/src/components/Audio.tsx index 6b23cfc59..b0be65cbf 100644 --- a/apps/embed/src/components/Audio.tsx +++ b/apps/embed/src/components/Audio.tsx @@ -1,22 +1,22 @@ -import { useAverageColor } from '@dragverse/browser'; +import { useAverageColor } from '@dragverse/browser' import { STATIC_ASSETS, TAPE_APP_NAME, TAPE_WEBSITE_URL -} from '@dragverse/constants'; +} from '@dragverse/constants' import { EVENTS, - Tower, getPublicationData, getThumbnailUrl, imageCdn, - sanitizeDStorageUrl -} from '@dragverse/generic'; -import type { PrimaryPublication } from '@dragverse/lens'; -import { AudioPlayer, PauseOutline, PlayOutline } from '@dragverse/ui'; -import Link from 'next/link'; -import type { FC } from 'react'; -import { useState } from 'react'; + sanitizeDStorageUrl, + Tower +} from '@dragverse/generic' +import type { PrimaryPublication } from '@dragverse/lens' +import { AudioPlayer, PauseOutline, PlayOutline } from '@dragverse/ui' +import Link from 'next/link' +import type { FC } from 'react' +import { useState } from 'react' type Props = { audio: PrimaryPublication diff --git a/apps/embed/src/components/Publication.tsx b/apps/embed/src/components/Publication.tsx index d03df52ae..bdac42cee 100644 --- a/apps/embed/src/components/Publication.tsx +++ b/apps/embed/src/components/Publication.tsx @@ -5,15 +5,15 @@ import { setFingerprint, tapeFont, videoPlayerTheme -} from '@dragverse/browser'; -import { getPublication, isListenable } from '@dragverse/generic'; -import type { AnyPublication } from '@dragverse/lens'; -import { LivepeerConfig } from '@livepeer/react'; -import type { FC } from 'react'; -import { useEffect } from 'react'; +} from '@dragverse/browser' +import { getPublication, isListenable } from '@dragverse/generic' +import type { AnyPublication } from '@dragverse/lens' +import { LivepeerConfig } from '@livepeer/react' +import type { FC } from 'react' +import { useEffect } from 'react' -import Audio from './Audio'; -import Video from './Video'; +import Audio from './Audio' +import Video from './Video' type Props = { publication: AnyPublication diff --git a/apps/embed/src/components/TopOverlay.tsx b/apps/embed/src/components/TopOverlay.tsx index 44ca1ff4c..47ef87c5c 100644 --- a/apps/embed/src/components/TopOverlay.tsx +++ b/apps/embed/src/components/TopOverlay.tsx @@ -1,21 +1,21 @@ -import { useCopyToClipboard } from '@dragverse/browser'; +import { useCopyToClipboard } from '@dragverse/browser' import { - STATIC_ASSETS, - TAPE_APP_NAME, - TAPE_WEBSITE_URL -} from '@dragverse/constants'; + STATIC_ASSETS, + TAPE_APP_NAME, + TAPE_WEBSITE_URL +} from '@dragverse/constants' import { - EVENTS, - Tower, - getProfile, - getProfilePicture, - getPublicationData -} from '@dragverse/generic'; -import type { PrimaryPublication } from '@dragverse/lens'; -import { CopyOutline } from '@dragverse/ui'; -import Link from 'next/link'; -import type { FC } from 'react'; -import { useEffect, useState } from 'react'; + EVENTS, + getProfile, + getProfilePicture, + getPublicationData, + Tower +} from '@dragverse/generic' +import type { PrimaryPublication } from '@dragverse/lens' +import { CopyOutline } from '@dragverse/ui' +import Link from 'next/link' +import type { FC } from 'react' +import { useEffect, useState } from 'react' type OverlayProps = { playerRef: HTMLMediaElement | undefined @@ -101,7 +101,7 @@ const TopOverlay: FC = ({ playerRef, video }) => {
{ const request: ExplorePublicationRequest = { diff --git a/apps/web/src/components/Bangers/Likes.tsx b/apps/web/src/components/Bangers/Likes.tsx index 497db25b8..003a92e18 100644 --- a/apps/web/src/components/Bangers/Likes.tsx +++ b/apps/web/src/components/Bangers/Likes.tsx @@ -1,17 +1,17 @@ -import HoverableProfile from '@components/Common/HoverableProfile'; -import { BangersBubbles } from '@components/Shimmers/BangersShimmer'; -import { COMMON_REGEX } from '@dragverse/constants'; +import HoverableProfile from '@components/Common/HoverableProfile' +import { BangersBubbles } from '@components/Shimmers/BangersShimmer' +import { COMMON_REGEX } from '@dragverse/constants' import { getProfile, getProfilePicture, getPublicationData -} from '@dragverse/generic'; +} from '@dragverse/generic' import type { PrimaryPublication, ProfileWhoReactedResult, WhoReactedPublicationRequest -} from '@dragverse/lens'; -import { LimitType, useWhoReactedPublicationQuery } from '@dragverse/lens'; +} from '@dragverse/lens' +import { LimitType, useWhoReactedPublicationQuery } from '@dragverse/lens' const Likes = ({ post }: { post: PrimaryPublication }) => { const parsePublicationId = () => { diff --git a/apps/web/src/components/Bangers/New.tsx b/apps/web/src/components/Bangers/New.tsx index 4a804bcdc..872cd9a00 100644 --- a/apps/web/src/components/Bangers/New.tsx +++ b/apps/web/src/components/Bangers/New.tsx @@ -1,52 +1,52 @@ -import { LENSHUB_PROXY_ABI } from '@dragverse/abis'; -import { getUserLocale } from '@dragverse/browser'; +import { LENSHUB_PROXY_ABI } from '@dragverse/abis' +import { getUserLocale } from '@dragverse/browser' import { - COMMON_REGEX, - ERROR_MESSAGE, - FALLBACK_COVER_URL, - LENSHUB_PROXY_ADDRESS, - OG_IMAGE, - REQUESTING_SIGNATURE_MESSAGE, - SIGN_IN_REQUIRED, - TAPE_APP_ID, - TAPE_WEBSITE_URL -} from '@dragverse/constants'; + COMMON_REGEX, + ERROR_MESSAGE, + FALLBACK_COVER_URL, + LENSHUB_PROXY_ADDRESS, + OG_IMAGE, + REQUESTING_SIGNATURE_MESSAGE, + SIGN_IN_REQUIRED, + TAPE_APP_ID, + TAPE_WEBSITE_URL +} from '@dragverse/constants' import { - EVENTS, - Tower, - checkLensManagerPermissions, - getProfile, - getSignature, - imageCdn, - trimify, - uploadToAr -} from '@dragverse/generic'; + checkLensManagerPermissions, + EVENTS, + getProfile, + getSignature, + imageCdn, + Tower, + trimify, + uploadToAr +} from '@dragverse/generic' import type { - CreateMomokaPostEip712TypedData, - CreateOnchainPostEip712TypedData -} from '@dragverse/lens'; + CreateMomokaPostEip712TypedData, + CreateOnchainPostEip712TypedData +} from '@dragverse/lens' import { - useBroadcastOnMomokaMutation, - useCreateMomokaPostTypedDataMutation, - usePostOnMomokaMutation -} from '@dragverse/lens'; -import type { CustomErrorWithData } from '@dragverse/lens/custom-types'; -import { Button, Input, Modal } from '@dragverse/ui'; -import { zodResolver } from '@hookform/resolvers/zod'; -import useHandleWrongNetwork from '@hooks/useHandleWrongNetwork'; -import type { MetadataAttribute } from '@lens-protocol/metadata'; -import { MetadataAttributeType, link } from '@lens-protocol/metadata'; -import useProfileStore from '@lib/store/idb/profile'; -import useNonceStore from '@lib/store/nonce'; -import Link from 'next/link'; -import type { FC } from 'react'; -import { useState } from 'react'; -import { useForm } from 'react-hook-form'; -import toast from 'react-hot-toast'; -import { v4 as uuidv4 } from 'uuid'; -import { useSignTypedData, useWriteContract } from 'wagmi'; -import type { z } from 'zod'; -import { object, string } from 'zod'; + useBroadcastOnMomokaMutation, + useCreateMomokaPostTypedDataMutation, + usePostOnMomokaMutation +} from '@dragverse/lens' +import type { CustomErrorWithData } from '@dragverse/lens/custom-types' +import { Button, Input, Modal } from '@dragverse/ui' +import { zodResolver } from '@hookform/resolvers/zod' +import useHandleWrongNetwork from '@hooks/useHandleWrongNetwork' +import type { MetadataAttribute } from '@lens-protocol/metadata' +import { link, MetadataAttributeType } from '@lens-protocol/metadata' +import useProfileStore from '@lib/store/idb/profile' +import useNonceStore from '@lib/store/nonce' +import Link from 'next/link' +import type { FC } from 'react' +import { useState } from 'react' +import { useForm } from 'react-hook-form' +import toast from 'react-hot-toast' +import { v4 as uuidv4 } from 'uuid' +import { useSignTypedData, useWriteContract } from 'wagmi' +import type { z } from 'zod' +import { object, string } from 'zod' const VALID_URL_REGEX = new RegExp( `${COMMON_REGEX.YOUTUBE_WATCH.source}|${COMMON_REGEX.TAPE_WATCH.source}|${COMMON_REGEX.VIMEO_WATCH.source}` @@ -252,7 +252,7 @@ const New: FC = ({ refetch }) => { title="Tape/YouTube/Vimeo links supported" placeholder="Paste a link to a banger" autoComplete="off" - className="bg-white dark:bg-brand-850" + className="dark:bg-brand-850 bg-white" error={errors.link?.message} showError={false} {...register('link')} diff --git a/apps/web/src/components/Bangers/RenderBanger.tsx b/apps/web/src/components/Bangers/RenderBanger.tsx index b3181a1d9..4e37c3219 100644 --- a/apps/web/src/components/Bangers/RenderBanger.tsx +++ b/apps/web/src/components/Bangers/RenderBanger.tsx @@ -1,12 +1,12 @@ -import PublicationReaction from '@components/Common/Publication/PublicationReaction'; -import { TAPE_WEBSITE_URL } from '@dragverse/constants'; -import { getPublicationData } from '@dragverse/generic'; -import type { PrimaryPublication } from '@dragverse/lens'; -import { FireOutline, Tooltip } from '@dragverse/ui'; -import { getDateString, getRelativeTime } from '@lib/formatTime'; +import PublicationReaction from '@components/Common/Publication/PublicationReaction' +import { TAPE_WEBSITE_URL } from '@dragverse/constants' +import { getPublicationData } from '@dragverse/generic' +import type { PrimaryPublication } from '@dragverse/lens' +import { FireOutline, Tooltip } from '@dragverse/ui' +import { getDateString, getRelativeTime } from '@lib/formatTime' -import Likes from './Likes'; -import RenderLink from './RenderLink'; +import Likes from './Likes' +import RenderLink from './RenderLink' const RenderBanger = ({ post, diff --git a/apps/web/src/components/Bangers/index.tsx b/apps/web/src/components/Bangers/index.tsx index 2d46c108c..c65448d78 100644 --- a/apps/web/src/components/Bangers/index.tsx +++ b/apps/web/src/components/Bangers/index.tsx @@ -1,11 +1,11 @@ -import MetaTags from '@components/Common/MetaTags'; -import { FEATURE_FLAGS } from '@dragverse/constants'; -import { EVENTS, getIsFeatureEnabled, Tower } from '@dragverse/generic'; -import useProfileStore from '@lib/store/idb/profile'; -import { useEffect } from 'react'; -import Custom404 from 'src/pages/404'; +import MetaTags from '@components/Common/MetaTags' +import { FEATURE_FLAGS } from '@dragverse/constants' +import { EVENTS, getIsFeatureEnabled, Tower } from '@dragverse/generic' +import useProfileStore from '@lib/store/idb/profile' +import { useEffect } from 'react' +import Custom404 from 'src/pages/404' -import Feed from './Feed'; +import Feed from './Feed' const Bangers = () => { const { activeProfile } = useProfileStore() diff --git a/apps/web/src/components/Bytes/ByteActions.tsx b/apps/web/src/components/Bytes/ByteActions.tsx index 361d7dfd3..43dff3a9d 100644 --- a/apps/web/src/components/Bytes/ByteActions.tsx +++ b/apps/web/src/components/Bytes/ByteActions.tsx @@ -1,18 +1,18 @@ -import MirrorPublication from '@components/Common/MirrorPublication'; -import PublicationOptions from '@components/Common/Publication/PublicationOptions'; -import PublicationReaction from '@components/Common/Publication/PublicationReaction'; -import OpenActions from '@components/Watch/OpenActions'; -import type { MirrorablePublication } from '@dragverse/lens'; +import MirrorPublication from '@components/Common/MirrorPublication' +import PublicationOptions from '@components/Common/Publication/PublicationOptions' +import PublicationReaction from '@components/Common/Publication/PublicationReaction' +import OpenActions from '@components/Watch/OpenActions' +import type { MirrorablePublication } from '@dragverse/lens' import { CollectOutline, CommentOutline, MirrorOutline, Modal -} from '@dragverse/ui'; -import type { FC } from 'react'; -import { useState } from 'react'; +} from '@dragverse/ui' +import type { FC } from 'react' +import { useState } from 'react' -import ByteComments from './ByteComments'; +import ByteComments from './ByteComments' type Props = { video: MirrorablePublication diff --git a/apps/web/src/components/Bytes/ByteComments.tsx b/apps/web/src/components/Bytes/ByteComments.tsx index c0a98e480..41c9b1acf 100644 --- a/apps/web/src/components/Bytes/ByteComments.tsx +++ b/apps/web/src/components/Bytes/ByteComments.tsx @@ -1,9 +1,9 @@ -import PublicationComments from '@components/Common/Publication/PublicationComments'; -import NonRelevantComments from '@components/Watch/Comments/NonRelevantComments'; -import type { MirrorablePublication } from '@dragverse/lens'; -import { CustomCommentsFilterEnum } from '@dragverse/lens/custom-types'; -import useCommentStore from '@lib/store/comment'; -import type { FC } from 'react'; +import PublicationComments from '@components/Common/Publication/PublicationComments' +import NonRelevantComments from '@components/Watch/Comments/NonRelevantComments' +import type { MirrorablePublication } from '@dragverse/lens' +import { CustomCommentsFilterEnum } from '@dragverse/lens/custom-types' +import useCommentStore from '@lib/store/comment' +import type { FC } from 'react' type Props = { video: MirrorablePublication diff --git a/apps/web/src/components/Bytes/ByteVideo.tsx b/apps/web/src/components/Bytes/ByteVideo.tsx index b8cac838a..6e166dd6d 100644 --- a/apps/web/src/components/Bytes/ByteVideo.tsx +++ b/apps/web/src/components/Bytes/ByteVideo.tsx @@ -1,22 +1,22 @@ -import MetaTags from '@components/Common/MetaTags'; +import MetaTags from '@components/Common/MetaTags' import { - getPublication, - getPublicationData, - getPublicationMediaUrl, - getShouldUploadVideo, - getThumbnailUrl, - imageCdn, - sanitizeDStorageUrl -} from '@dragverse/generic'; -import type { AnyPublication } from '@dragverse/lens'; -import { VideoPlayer } from '@dragverse/ui'; -import useProfileStore from '@lib/store/idb/profile'; -import type { FC } from 'react'; -import React, { useEffect, useRef } from 'react'; + getPublication, + getPublicationData, + getPublicationMediaUrl, + getShouldUploadVideo, + getThumbnailUrl, + imageCdn, + sanitizeDStorageUrl +} from '@dragverse/generic' +import type { AnyPublication } from '@dragverse/lens' +import { VideoPlayer } from '@dragverse/ui' +import useProfileStore from '@lib/store/idb/profile' +import type { FC } from 'react' +import React, { useEffect, useRef } from 'react' -import BottomOverlay from './BottomOverlay'; -import ByteActions from './ByteActions'; -import TopOverlay from './TopOverlay'; +import BottomOverlay from './BottomOverlay' +import ByteActions from './ByteActions' +import TopOverlay from './TopOverlay' type Props = { video: AnyPublication @@ -97,7 +97,7 @@ const ByteVideo: FC = ({
-
+
= ({ heading }) => { } return ( -
+
= ({ profile, children, pfp }) => { )} - +
{ const { resolvedTheme } = useTheme() diff --git a/apps/web/src/components/Common/MirrorPublication.tsx b/apps/web/src/components/Common/MirrorPublication.tsx index 69dd25555..9c2aea8b7 100644 --- a/apps/web/src/components/Common/MirrorPublication.tsx +++ b/apps/web/src/components/Common/MirrorPublication.tsx @@ -1,38 +1,38 @@ -import { LENSHUB_PROXY_ABI } from '@dragverse/abis'; +import { LENSHUB_PROXY_ABI } from '@dragverse/abis' import { ERROR_MESSAGE, LENSHUB_PROXY_ADDRESS, REQUESTING_SIGNATURE_MESSAGE, SIGN_IN_REQUIRED -} from '@dragverse/constants'; +} from '@dragverse/constants' import { - EVENTS, - Tower, checkLensManagerPermissions, - getSignature -} from '@dragverse/generic'; + EVENTS, + getSignature, + Tower +} from '@dragverse/generic' import type { CreateMomokaMirrorEip712TypedData, CreateOnchainMirrorEip712TypedData, MirrorablePublication, MomokaMirrorRequest -} from '@dragverse/lens'; +} from '@dragverse/lens' import { - useBroadcastOnMomokaMutation, useBroadcastOnchainMutation, + useBroadcastOnMomokaMutation, useCreateMomokaMirrorTypedDataMutation, useCreateOnchainMirrorTypedDataMutation, - useMirrorOnMomokaMutation, - useMirrorOnchainMutation -} from '@dragverse/lens'; -import type { CustomErrorWithData } from '@dragverse/lens/custom-types'; -import useHandleWrongNetwork from '@hooks/useHandleWrongNetwork'; -import useProfileStore from '@lib/store/idb/profile'; -import useNonceStore from '@lib/store/nonce'; -import type { FC } from 'react'; -import React, { useState } from 'react'; -import toast from 'react-hot-toast'; -import { useSignTypedData, useWriteContract } from 'wagmi'; + useMirrorOnchainMutation, + useMirrorOnMomokaMutation +} from '@dragverse/lens' +import type { CustomErrorWithData } from '@dragverse/lens/custom-types' +import useHandleWrongNetwork from '@hooks/useHandleWrongNetwork' +import useProfileStore from '@lib/store/idb/profile' +import useNonceStore from '@lib/store/nonce' +import type { FC } from 'react' +import React, { useState } from 'react' +import toast from 'react-hot-toast' +import { useSignTypedData, useWriteContract } from 'wagmi' type Props = { video: MirrorablePublication diff --git a/apps/web/src/components/Common/MirroredList.tsx b/apps/web/src/components/Common/MirroredList.tsx index 0838259b2..54b1dd63d 100644 --- a/apps/web/src/components/Common/MirroredList.tsx +++ b/apps/web/src/components/Common/MirroredList.tsx @@ -1,18 +1,18 @@ -import { NoDataFound } from '@components/UIElements/NoDataFound'; -import { getProfile, getProfilePicture } from '@dragverse/generic'; +import { NoDataFound } from '@components/UIElements/NoDataFound' +import { getProfile, getProfilePicture } from '@dragverse/generic' import { LimitType, - useProfilesQuery, type Profile, - type ProfilesRequest -} from '@dragverse/lens'; -import { Spinner, UserOutline } from '@dragverse/ui'; -import Link from 'next/link'; -import type { FC } from 'react'; -import { useInView } from 'react-cool-inview'; + type ProfilesRequest, + useProfilesQuery +} from '@dragverse/lens' +import { Spinner, UserOutline } from '@dragverse/ui' +import Link from 'next/link' +import type { FC } from 'react' +import { useInView } from 'react-cool-inview' -import Badge from './Badge'; -import HoverableProfile from './HoverableProfile'; +import Badge from './Badge' +import HoverableProfile from './HoverableProfile' type Props = { videoId: string diff --git a/apps/web/src/components/Common/MobileBottomNav.tsx b/apps/web/src/components/Common/MobileBottomNav.tsx index db8f16ebf..3029b1126 100644 --- a/apps/web/src/components/Common/MobileBottomNav.tsx +++ b/apps/web/src/components/Common/MobileBottomNav.tsx @@ -1,13 +1,13 @@ -import { tw } from '@dragverse/browser'; +import { tw } from '@dragverse/browser' import { - BellOutline, - BytesOutline, - FeedOutline, - HomeOutline, - PlusOutline -} from '@dragverse/ui'; -import Link from 'next/link'; -import { useRouter } from 'next/router'; + BellOutline, + BytesOutline, + FeedOutline, + HomeOutline, + PlusOutline +} from '@dragverse/ui' +import Link from 'next/link' +import { useRouter } from 'next/router' const MobileBottomNav = () => { const router = useRouter() @@ -15,7 +15,7 @@ const MobileBottomNav = () => { const isActivePath = (path: string) => router.pathname === path return ( -
+
{ const { pathname, asPath } = useRouter() @@ -29,7 +29,7 @@ const Navbar = () => { } = usePersistStore() return ( -
+
diff --git a/apps/web/src/components/Common/Providers/SubscriptionProvider.tsx b/apps/web/src/components/Common/Providers/SubscriptionProvider.tsx index 4c5801677..080eec77d 100644 --- a/apps/web/src/components/Common/Providers/SubscriptionProvider.tsx +++ b/apps/web/src/components/Common/Providers/SubscriptionProvider.tsx @@ -1,20 +1,19 @@ -import { LENS_API_URL } from '@dragverse/constants'; +import { LENS_API_URL } from '@dragverse/constants' +import type { Notification, UserSigNonces } from '@dragverse/lens' import { AuthorizationRecordRevokedSubscriptionDocument, NewNotificationSubscriptionDocument, - Notification, - UserSigNonces, UserSigNoncesSubscriptionDocument -} from '@dragverse/lens'; -import { useApolloClient } from '@dragverse/lens/apollo'; -import getCurrentSession from '@lib/getCurrentSession'; -import { signOut } from '@lib/store/auth'; -import useNonceStore from '@lib/store/nonce'; -import usePersistStore from '@lib/store/persist'; -import { useEffect } from 'react'; -import useWebSocket from 'react-use-websocket'; -import { isAddress } from 'viem'; -import { useAccount } from 'wagmi'; +} from '@dragverse/lens' +import { useApolloClient } from '@dragverse/lens/apollo' +import getCurrentSession from '@lib/getCurrentSession' +import { signOut } from '@lib/store/auth' +import useNonceStore from '@lib/store/nonce' +import usePersistStore from '@lib/store/persist' +import { useEffect } from 'react' +import useWebSocket from 'react-use-websocket' +import { isAddress } from 'viem' +import { useAccount } from 'wagmi' const SubscriptionProvider = () => { const { address } = useAccount() diff --git a/apps/web/src/components/Common/Providers/TogglesProvider.tsx b/apps/web/src/components/Common/Providers/TogglesProvider.tsx index 3b7342d14..f19fcc4a4 100644 --- a/apps/web/src/components/Common/Providers/TogglesProvider.tsx +++ b/apps/web/src/components/Common/Providers/TogglesProvider.tsx @@ -1,9 +1,9 @@ import { - IS_MAINNET, - TESTNET_ALLOWED_TOKENS, - WORKER_ALLOWED_TOKENS_URL, - WORKER_TOGGLES_URL, - WORKER_VERIFIED_URL + IS_MAINNET, + TESTNET_ALLOWED_TOKENS, + WORKER_ALLOWED_TOKENS_URL, + WORKER_TOGGLES_URL, + WORKER_VERIFIED_URL } from '@dragverse/constants' import useProfileStore from '@lib/store/idb/profile' import useProfileRestrictionsStore from '@lib/store/idb/restrictions' diff --git a/apps/web/src/components/Common/Providers/Web3Provider.tsx b/apps/web/src/components/Common/Providers/Web3Provider.tsx index 7469b84af..18dab0ca9 100644 --- a/apps/web/src/components/Common/Providers/Web3Provider.tsx +++ b/apps/web/src/components/Common/Providers/Web3Provider.tsx @@ -1,8 +1,8 @@ -import { TAPE_APP_NAME, WC_PROJECT_ID } from '@dragverse/constants'; -import { type FC, type ReactNode } from 'react'; -import { WagmiProvider, createConfig, http } from 'wagmi'; -import { polygon, polygonMumbai } from 'wagmi/chains'; -import { coinbaseWallet, injected, walletConnect } from 'wagmi/connectors'; +import { TAPE_APP_NAME, WC_PROJECT_ID } from '@dragverse/constants' +import { type FC, type ReactNode } from 'react' +import { createConfig, http, WagmiProvider } from 'wagmi' +import { polygon, polygonMumbai } from 'wagmi/chains' +import { coinbaseWallet, injected, walletConnect } from 'wagmi/connectors' const connectors = [ injected(), diff --git a/apps/web/src/components/Common/Publication/PublicationActions.tsx b/apps/web/src/components/Common/Publication/PublicationActions.tsx index a51be5914..fc9054baf 100644 --- a/apps/web/src/components/Common/Publication/PublicationActions.tsx +++ b/apps/web/src/components/Common/Publication/PublicationActions.tsx @@ -1,21 +1,21 @@ -import MirrorPublication from '@components/Common/MirrorPublication'; -import PublicationOptions from '@components/Common/Publication/PublicationOptions'; -import { getProfile } from '@dragverse/generic'; -import type { MirrorablePublication } from '@dragverse/lens'; -import { TriStateValue } from '@dragverse/lens'; +import MirrorPublication from '@components/Common/MirrorPublication' +import PublicationOptions from '@components/Common/Publication/PublicationOptions' +import { getProfile } from '@dragverse/generic' +import type { MirrorablePublication } from '@dragverse/lens' +import { TriStateValue } from '@dragverse/lens' import { CollectOutline, MirrorOutline, Modal, ThreeDotsOutline, TipOutline -} from '@dragverse/ui'; -import type { FC } from 'react'; -import { useState } from 'react'; +} from '@dragverse/ui' +import type { FC } from 'react' +import { useState } from 'react' -import OpenActions from '../../Watch/OpenActions'; -import TipForm from '../../Watch/TipForm'; -import PublicationReaction from './PublicationReaction'; +import OpenActions from '../../Watch/OpenActions' +import TipForm from '../../Watch/TipForm' +import PublicationReaction from './PublicationReaction' type Props = { publication: MirrorablePublication diff --git a/apps/web/src/components/Common/Publication/PublicationComments.tsx b/apps/web/src/components/Common/Publication/PublicationComments.tsx index 86146b943..6c9681557 100644 --- a/apps/web/src/components/Common/Publication/PublicationComments.tsx +++ b/apps/web/src/components/Common/Publication/PublicationComments.tsx @@ -1,35 +1,35 @@ -import Alert from '@components/Common/Alert'; -import CommentsShimmer from '@components/Shimmers/CommentsShimmer'; -import { NoDataFound } from '@components/UIElements/NoDataFound'; +import Alert from '@components/Common/Alert' +import CommentsShimmer from '@components/Shimmers/CommentsShimmer' +import { NoDataFound } from '@components/UIElements/NoDataFound' import { INFINITE_SCROLL_ROOT_MARGIN, LENS_CUSTOM_FILTERS -} from '@dragverse/constants'; -import { getProfile } from '@dragverse/generic'; +} from '@dragverse/constants' +import { getProfile } from '@dragverse/generic' import type { AnyPublication, Comment, MirrorablePublication, PublicationsRequest -} from '@dragverse/lens'; +} from '@dragverse/lens' import { CommentRankingFilterType, LimitType, TriStateValue, usePublicationsQuery -} from '@dragverse/lens'; -import { CustomCommentsFilterEnum } from '@dragverse/lens/custom-types'; -import { CommentOutline, Spinner } from '@dragverse/ui'; -import useCommentStore from '@lib/store/comment'; -import useProfileStore from '@lib/store/idb/profile'; -import usePersistStore from '@lib/store/persist'; -import type { FC } from 'react'; -import { useInView } from 'react-cool-inview'; +} from '@dragverse/lens' +import { CustomCommentsFilterEnum } from '@dragverse/lens/custom-types' +import { CommentOutline, Spinner } from '@dragverse/ui' +import useCommentStore from '@lib/store/comment' +import useProfileStore from '@lib/store/idb/profile' +import usePersistStore from '@lib/store/persist' +import type { FC } from 'react' +import { useInView } from 'react-cool-inview' -import CommentsFilter from '../../Watch/Comments/CommentsFilter'; -import NewComment from '../../Watch/Comments/NewComment'; -import QueuedComment from '../../Watch/Comments/QueuedComment'; -import RenderComment from '../../Watch/Comments/RenderComment'; +import CommentsFilter from '../../Watch/Comments/CommentsFilter' +import NewComment from '../../Watch/Comments/NewComment' +import QueuedComment from '../../Watch/Comments/QueuedComment' +import RenderComment from '../../Watch/Comments/RenderComment' type Props = { publication: MirrorablePublication diff --git a/apps/web/src/components/Common/Publication/PublicationOptions.tsx b/apps/web/src/components/Common/Publication/PublicationOptions.tsx index 998bec8a3..d90dd0441 100644 --- a/apps/web/src/components/Common/Publication/PublicationOptions.tsx +++ b/apps/web/src/components/Common/Publication/PublicationOptions.tsx @@ -1,17 +1,16 @@ -import ReportPublication from '@components/Report/Publication'; -import Confirm from '@components/UIElements/Confirm'; -import { LENSHUB_PROXY_ABI } from '@dragverse/abis'; +import ReportPublication from '@components/Report/Publication' +import Confirm from '@components/UIElements/Confirm' +import { LENSHUB_PROXY_ABI } from '@dragverse/abis' import { ERROR_MESSAGE, LENSHUB_PROXY_ADDRESS, REQUESTING_SIGNATURE_MESSAGE, SIGN_IN_REQUIRED, TAPE_APP_ID -} from '@dragverse/constants'; +} from '@dragverse/constants' import { - EVENTS, - Tower, checkLensManagerPermissions, + EVENTS, getIsIPFSUrl, getMetadataCid, getProfileCoverPicture, @@ -19,14 +18,15 @@ import { getSignature, getValueFromKeyInAttributes, logger, + Tower, trimify, uploadToAr -} from '@dragverse/generic'; +} from '@dragverse/generic' import type { OnchainSetProfileMetadataRequest, PrimaryPublication, Profile -} from '@dragverse/lens'; +} from '@dragverse/lens' import { useAddPublicationBookmarkMutation, useAddPublicationNotInterestedMutation, @@ -36,9 +36,9 @@ import { useRemovePublicationBookmarkMutation, useSetProfileMetadataMutation, useUndoPublicationNotInterestedMutation -} from '@dragverse/lens'; -import { useApolloClient } from '@dragverse/lens/apollo'; -import type { CustomErrorWithData } from '@dragverse/lens/custom-types'; +} from '@dragverse/lens' +import { useApolloClient } from '@dragverse/lens/apollo' +import type { CustomErrorWithData } from '@dragverse/lens/custom-types' import { BookmarkOutline, DropdownMenu, @@ -51,20 +51,20 @@ import { ShareOutline, ThreeDotsOutline, TrashOutline -} from '@dragverse/ui'; -import useHandleWrongNetwork from '@hooks/useHandleWrongNetwork'; -import type { ProfileOptions } from '@lens-protocol/metadata'; -import { MetadataAttributeType, profile } from '@lens-protocol/metadata'; -import useProfileStore from '@lib/store/idb/profile'; -import type { FC, ReactNode } from 'react'; -import { useState } from 'react'; -import toast from 'react-hot-toast'; -import { v4 as uuidv4 } from 'uuid'; -import { useSignTypedData, useWriteContract } from 'wagmi'; - -import ArweaveExplorerLink from '../Links/ArweaveExplorerLink'; -import IPFSLink from '../Links/IPFSLink'; -import Share from '../VideoCard/Share'; +} from '@dragverse/ui' +import useHandleWrongNetwork from '@hooks/useHandleWrongNetwork' +import type { ProfileOptions } from '@lens-protocol/metadata' +import { MetadataAttributeType, profile } from '@lens-protocol/metadata' +import useProfileStore from '@lib/store/idb/profile' +import type { FC, ReactNode } from 'react' +import { useState } from 'react' +import toast from 'react-hot-toast' +import { v4 as uuidv4 } from 'uuid' +import { useSignTypedData, useWriteContract } from 'wagmi' + +import ArweaveExplorerLink from '../Links/ArweaveExplorerLink' +import IPFSLink from '../Links/IPFSLink' +import Share from '../VideoCard/Share' type Props = { publication: PrimaryPublication diff --git a/apps/web/src/components/Common/Publication/PublicationReaction.tsx b/apps/web/src/components/Common/Publication/PublicationReaction.tsx index c5e646b8f..8a2e3de8c 100644 --- a/apps/web/src/components/Common/Publication/PublicationReaction.tsx +++ b/apps/web/src/components/Common/Publication/PublicationReaction.tsx @@ -1,17 +1,17 @@ -import { tw } from '@dragverse/browser'; -import { SIGN_IN_REQUIRED } from '@dragverse/constants'; -import { EVENTS, formatNumber, getPublication, Tower } from '@dragverse/generic'; -import type { AnyPublication } from '@dragverse/lens'; +import { tw } from '@dragverse/browser' +import { SIGN_IN_REQUIRED } from '@dragverse/constants' +import { EVENTS, formatNumber, getPublication, Tower } from '@dragverse/generic' +import type { AnyPublication } from '@dragverse/lens' import { PublicationReactionType, useAddReactionMutation, useRemoveReactionMutation -} from '@dragverse/lens'; -import { HeartFilled, HeartOutline } from '@dragverse/ui'; -import useProfileStore from '@lib/store/idb/profile'; -import type { FC } from 'react'; -import { useState } from 'react'; -import toast from 'react-hot-toast'; +} from '@dragverse/lens' +import { HeartFilled, HeartOutline } from '@dragverse/ui' +import useProfileStore from '@lib/store/idb/profile' +import type { FC } from 'react' +import { useState } from 'react' +import toast from 'react-hot-toast' type Props = { publication: AnyPublication diff --git a/apps/web/src/components/Common/Search/GlobalSearch.tsx b/apps/web/src/components/Common/Search/GlobalSearch.tsx index 32e378f14..0077d9057 100644 --- a/apps/web/src/components/Common/Search/GlobalSearch.tsx +++ b/apps/web/src/components/Common/Search/GlobalSearch.tsx @@ -1,31 +1,31 @@ -import { NoDataFound } from '@components/UIElements/NoDataFound'; -import { tw, useDebounce, useOutsideClick } from '@dragverse/browser'; +import { NoDataFound } from '@components/UIElements/NoDataFound' +import { tw, useDebounce, useOutsideClick } from '@dragverse/browser' import { - LENSTUBE_APP_ID, - LENSTUBE_BYTES_APP_ID, - LENS_CUSTOM_FILTERS, - TAPE_APP_ID, - TAPE_BYTES_APP_ID -} from '@dragverse/constants'; -import { EVENTS, Tower } from '@dragverse/generic'; + LENS_CUSTOM_FILTERS, + LENSTUBE_APP_ID, + LENSTUBE_BYTES_APP_ID, + TAPE_APP_ID, + TAPE_BYTES_APP_ID +} from '@dragverse/constants' +import { EVENTS, Tower } from '@dragverse/generic' import type { - PrimaryPublication, - Profile, - ProfileSearchRequest, - PublicationSearchRequest -} from '@dragverse/lens'; + PrimaryPublication, + Profile, + ProfileSearchRequest, + PublicationSearchRequest +} from '@dragverse/lens' import { - LimitType, - PublicationMetadataMainFocusType, - SearchPublicationType, - useSearchProfilesLazyQuery, - useSearchPublicationsLazyQuery -} from '@dragverse/lens'; -import { Input, SearchOutline, Spinner } from '@dragverse/ui'; -import { useEffect, useRef, useState } from 'react'; + LimitType, + PublicationMetadataMainFocusType, + SearchPublicationType, + useSearchProfilesLazyQuery, + useSearchPublicationsLazyQuery +} from '@dragverse/lens' +import { Input, SearchOutline, Spinner } from '@dragverse/ui' +import { useEffect, useRef, useState } from 'react' -import Profiles from './Profiles'; -import Publications from './Publications'; +import Profiles from './Profiles' +import Publications from './Publications' const GlobalSearch = () => { const [showSearchBar, setShowSearchBar] = useState(false) @@ -121,7 +121,7 @@ const GlobalSearch = () => { />
{ const { theme, setTheme } = useTheme() diff --git a/apps/web/src/components/Common/VideoCard/QueuedVideo.tsx b/apps/web/src/components/Common/VideoCard/QueuedVideo.tsx index fa871272e..891920cdf 100644 --- a/apps/web/src/components/Common/VideoCard/QueuedVideo.tsx +++ b/apps/web/src/components/Common/VideoCard/QueuedVideo.tsx @@ -1,26 +1,26 @@ -import { tw, useAverageColor } from '@dragverse/browser'; -import { STATIC_ASSETS } from '@dragverse/constants'; +import { tw, useAverageColor } from '@dragverse/browser' +import { STATIC_ASSETS } from '@dragverse/constants' import { getProfile, getProfilePicture, imageCdn, sanitizeDStorageUrl -} from '@dragverse/generic'; +} from '@dragverse/generic' import { PublicationDocument, usePublicationQuery, useTxIdToTxHashQuery -} from '@dragverse/lens'; -import { useApolloClient } from '@dragverse/lens/apollo'; -import type { QueuedVideoType } from '@dragverse/lens/custom-types'; -import { Tooltip } from '@dragverse/ui'; -import usePendingTxn from '@hooks/usePendingTxn'; -import useAppStore, { UPLOADED_VIDEO_FORM_DEFAULTS } from '@lib/store'; -import useProfileStore from '@lib/store/idb/profile'; -import usePersistStore from '@lib/store/persist'; -import type { FC } from 'react'; +} from '@dragverse/lens' +import { useApolloClient } from '@dragverse/lens/apollo' +import type { QueuedVideoType } from '@dragverse/lens/custom-types' +import { Tooltip } from '@dragverse/ui' +import usePendingTxn from '@hooks/usePendingTxn' +import useAppStore, { UPLOADED_VIDEO_FORM_DEFAULTS } from '@lib/store' +import useProfileStore from '@lib/store/idb/profile' +import usePersistStore from '@lib/store/persist' +import type { FC } from 'react' -import Badge from '../Badge'; +import Badge from '../Badge' type Props = { queuedVideo: QueuedVideoType diff --git a/apps/web/src/components/Common/VideoCard/Share.tsx b/apps/web/src/components/Common/VideoCard/Share.tsx index bc66f21af..fc04aa9c2 100644 --- a/apps/web/src/components/Common/VideoCard/Share.tsx +++ b/apps/web/src/components/Common/VideoCard/Share.tsx @@ -1,14 +1,19 @@ -import { useCopyToClipboard } from '@dragverse/browser'; -import { LINKEDIN_ICON_URL, STATIC_ASSETS, TAPEXYZ_LOGO, TAPE_WEBSITE_URL } from '@dragverse/constants'; -import { EVENTS, Tower, getSharableLink, imageCdn } from '@dragverse/generic'; -import type { PrimaryPublication } from '@dragverse/lens'; -import { CopyOutline, MirrorOutline, Tooltip } from '@dragverse/ui'; -import { useTheme } from 'next-themes'; -import Link from 'next/link'; -import type { FC } from 'react'; +import { useCopyToClipboard } from '@dragverse/browser' +import { + LINKEDIN_ICON_URL, + STATIC_ASSETS, + TAPE_WEBSITE_URL, + TAPEXYZ_LOGO +} from '@dragverse/constants' +import { EVENTS, getSharableLink, imageCdn, Tower } from '@dragverse/generic' +import type { PrimaryPublication } from '@dragverse/lens' +import { CopyOutline, MirrorOutline, Tooltip } from '@dragverse/ui' +import Link from 'next/link' +import { useTheme } from 'next-themes' +import type { FC } from 'react' -import EmbedMedia from '../EmbedMedia'; -import MirrorPublication from '../MirrorPublication'; +import EmbedMedia from '../EmbedMedia' +import MirrorPublication from '../MirrorPublication' type Props = { publication: PrimaryPublication diff --git a/apps/web/src/components/Common/VideoCard/ThumbnailImage.tsx b/apps/web/src/components/Common/VideoCard/ThumbnailImage.tsx index 00f5629cc..2869a031d 100644 --- a/apps/web/src/components/Common/VideoCard/ThumbnailImage.tsx +++ b/apps/web/src/components/Common/VideoCard/ThumbnailImage.tsx @@ -1,17 +1,17 @@ -import { tw, useAverageColor } from '@dragverse/browser'; +import { tw, useAverageColor } from '@dragverse/browser' import { FALLBACK_THUMBNAIL_URL, LENSTUBE_BYTES_APP_ID, STATIC_ASSETS -} from '@dragverse/constants'; +} from '@dragverse/constants' import { getIsSensitiveContent, getPublication, getThumbnailUrl, imageCdn -} from '@dragverse/generic'; -import type { AnyPublication } from '@dragverse/lens'; -import type { FC } from 'react'; +} from '@dragverse/generic' +import type { AnyPublication } from '@dragverse/lens' +import type { FC } from 'react' type Props = { video: AnyPublication diff --git a/apps/web/src/components/Common/VideoCard/index.tsx b/apps/web/src/components/Common/VideoCard/index.tsx index 9ce121736..d1095ff63 100644 --- a/apps/web/src/components/Common/VideoCard/index.tsx +++ b/apps/web/src/components/Common/VideoCard/index.tsx @@ -1,20 +1,20 @@ -import { LENSTUBE_BYTES_APP_ID } from '@dragverse/constants'; +import { LENSTUBE_BYTES_APP_ID } from '@dragverse/constants' import { formatNumber, getProfile, getProfilePicture, getPublicationData -} from '@dragverse/generic'; -import type { PrimaryPublication, VideoMetadataV3 } from '@dragverse/lens'; -import { HeartOutline } from '@dragverse/ui'; -import { getShortHandTime } from '@lib/formatTime'; -import Link from 'next/link'; -import type { FC } from 'react'; +} from '@dragverse/generic' +import type { PrimaryPublication, VideoMetadataV3 } from '@dragverse/lens' +import { HeartOutline } from '@dragverse/ui' +import { getShortHandTime } from '@lib/formatTime' +import Link from 'next/link' +import type { FC } from 'react' -import HoverableProfile from '../HoverableProfile'; -import PublicationOptions from '../Publication/PublicationOptions'; -import ThumbnailImage from './ThumbnailImage'; -import ThumbnailOverlays from './ThumbnailOverlays'; +import HoverableProfile from '../HoverableProfile' +import PublicationOptions from '../Publication/PublicationOptions' +import ThumbnailImage from './ThumbnailImage' +import ThumbnailOverlays from './ThumbnailOverlays' type Props = { video: PrimaryPublication diff --git a/apps/web/src/components/Create/ChooseThumbnail.tsx b/apps/web/src/components/Create/ChooseThumbnail.tsx index 54eecda0d..97255d134 100644 --- a/apps/web/src/components/Create/ChooseThumbnail.tsx +++ b/apps/web/src/components/Create/ChooseThumbnail.tsx @@ -1,10 +1,10 @@ -import ThumbnailsShimmer from '@components/Shimmers/ThumbnailsShimmer'; -import { generateVideoThumbnails, tw } from '@dragverse/browser'; -import { logger } from '@dragverse/generic'; -import { AddImageOutline, CheckOutline, Spinner } from '@dragverse/ui'; -import useAppStore from '@lib/store'; -import type { ChangeEvent, FC } from 'react'; -import { useEffect, useState } from 'react'; +import ThumbnailsShimmer from '@components/Shimmers/ThumbnailsShimmer' +import { generateVideoThumbnails, tw } from '@dragverse/browser' +import { logger } from '@dragverse/generic' +import { AddImageOutline, CheckOutline, Spinner } from '@dragverse/ui' +import useAppStore from '@lib/store' +import type { ChangeEvent, FC } from 'react' +import { useEffect, useState } from 'react' interface Props { file: File | null diff --git a/apps/web/src/components/Create/CollectModule/ChargeQuestion.tsx b/apps/web/src/components/Create/CollectModule/ChargeQuestion.tsx index fcc77c8a6..975eca399 100644 --- a/apps/web/src/components/Create/CollectModule/ChargeQuestion.tsx +++ b/apps/web/src/components/Create/CollectModule/ChargeQuestion.tsx @@ -1,8 +1,8 @@ -import { tw } from '@dragverse/browser'; -import type { CollectModuleType } from '@dragverse/lens/custom-types'; -import { Button } from '@dragverse/ui'; -import useAppStore from '@lib/store'; -import type { FC } from 'react'; +import { tw } from '@dragverse/browser' +import type { CollectModuleType } from '@dragverse/lens/custom-types' +import { Button } from '@dragverse/ui' +import useAppStore from '@lib/store' +import type { FC } from 'react' type Props = { setCollectType: (data: CollectModuleType) => void diff --git a/apps/web/src/components/Create/CollectModule/CollectDuration.tsx b/apps/web/src/components/Create/CollectModule/CollectDuration.tsx index 72dfe589d..3dcfc2eb7 100644 --- a/apps/web/src/components/Create/CollectModule/CollectDuration.tsx +++ b/apps/web/src/components/Create/CollectModule/CollectDuration.tsx @@ -1,10 +1,10 @@ -import { tw } from '@dragverse/browser'; -import { trimify } from '@dragverse/generic'; -import type { CollectModuleType } from '@dragverse/lens/custom-types'; -import { Button, Input } from '@dragverse/ui'; -import useAppStore from '@lib/store'; -import type { FC } from 'react'; -import { useState } from 'react'; +import { tw } from '@dragverse/browser' +import { trimify } from '@dragverse/generic' +import type { CollectModuleType } from '@dragverse/lens/custom-types' +import { Button, Input } from '@dragverse/ui' +import useAppStore from '@lib/store' +import type { FC } from 'react' +import { useState } from 'react' type Props = { setCollectType: (data: CollectModuleType) => void diff --git a/apps/web/src/components/Create/CollectModule/EditionSize.tsx b/apps/web/src/components/Create/CollectModule/EditionSize.tsx index aa0e750dc..46a7f0195 100644 --- a/apps/web/src/components/Create/CollectModule/EditionSize.tsx +++ b/apps/web/src/components/Create/CollectModule/EditionSize.tsx @@ -1,10 +1,10 @@ -import { tw } from '@dragverse/browser'; -import { trimify } from '@dragverse/generic'; -import type { CollectModuleType } from '@dragverse/lens/custom-types'; -import { Button, Input } from '@dragverse/ui'; -import useAppStore from '@lib/store'; -import type { FC } from 'react'; -import { useState } from 'react'; +import { tw } from '@dragverse/browser' +import { trimify } from '@dragverse/generic' +import type { CollectModuleType } from '@dragverse/lens/custom-types' +import { Button, Input } from '@dragverse/ui' +import useAppStore from '@lib/store' +import type { FC } from 'react' +import { useState } from 'react' type Props = { setCollectType: (data: CollectModuleType) => void diff --git a/apps/web/src/components/Create/CollectModule/FeeCollectForm.tsx b/apps/web/src/components/Create/CollectModule/FeeCollectForm.tsx index e373fa79c..513963dbb 100644 --- a/apps/web/src/components/Create/CollectModule/FeeCollectForm.tsx +++ b/apps/web/src/components/Create/CollectModule/FeeCollectForm.tsx @@ -1,18 +1,18 @@ -import { WMATIC_TOKEN_ADDRESS } from '@dragverse/constants'; -import type { CollectModuleType } from '@dragverse/lens/custom-types'; -import { Button, Input, Select, SelectItem } from '@dragverse/ui'; -import { zodResolver } from '@hookform/resolvers/zod'; -import useAppStore from '@lib/store'; -import useProfileStore from '@lib/store/idb/profile'; -import useAllowedTokensStore from '@lib/store/idb/tokens'; -import type { Dispatch, FC } from 'react'; -import { useEffect, useRef, useState } from 'react'; -import { useForm } from 'react-hook-form'; -import { isAddress } from 'viem'; -import type { z } from 'zod'; -import { number, object, string } from 'zod'; +import { WMATIC_TOKEN_ADDRESS } from '@dragverse/constants' +import type { CollectModuleType } from '@dragverse/lens/custom-types' +import { Button, Input, Select, SelectItem } from '@dragverse/ui' +import { zodResolver } from '@hookform/resolvers/zod' +import useAppStore from '@lib/store' +import useProfileStore from '@lib/store/idb/profile' +import useAllowedTokensStore from '@lib/store/idb/tokens' +import type { Dispatch, FC } from 'react' +import { useEffect, useRef, useState } from 'react' +import { useForm } from 'react-hook-form' +import { isAddress } from 'viem' +import type { z } from 'zod' +import { number, object, string } from 'zod' -import Splits from './Splits'; +import Splits from './Splits' type Props = { setCollectType: (data: CollectModuleType) => void diff --git a/apps/web/src/components/Create/CollectModule/PermissionQuestion.tsx b/apps/web/src/components/Create/CollectModule/PermissionQuestion.tsx index 9fa0fc3e3..358aa872d 100644 --- a/apps/web/src/components/Create/CollectModule/PermissionQuestion.tsx +++ b/apps/web/src/components/Create/CollectModule/PermissionQuestion.tsx @@ -1,8 +1,8 @@ -import { tw } from '@dragverse/browser'; -import type { CollectModuleType } from '@dragverse/lens/custom-types'; -import { Button } from '@dragverse/ui'; -import useAppStore from '@lib/store'; -import type { FC } from 'react'; +import { tw } from '@dragverse/browser' +import type { CollectModuleType } from '@dragverse/lens/custom-types' +import { Button } from '@dragverse/ui' +import useAppStore from '@lib/store' +import type { FC } from 'react' type Props = { setCollectType: (data: CollectModuleType) => void diff --git a/apps/web/src/components/Create/CollectModule/Splits.tsx b/apps/web/src/components/Create/CollectModule/Splits.tsx index de6b1ecff..68cbeff88 100644 --- a/apps/web/src/components/Create/CollectModule/Splits.tsx +++ b/apps/web/src/components/Create/CollectModule/Splits.tsx @@ -1,31 +1,31 @@ -import { NoDataFound } from '@components/UIElements/NoDataFound'; -import ProfileSuggestion from '@components/UIElements/ProfileSuggestion'; -import { tw, useDebounce, useOutsideClick } from '@dragverse/browser'; +import { NoDataFound } from '@components/UIElements/NoDataFound' +import ProfileSuggestion from '@components/UIElements/ProfileSuggestion' +import { tw, useDebounce, useOutsideClick } from '@dragverse/browser' import { - DRAGVERSE_ADMIN_ADDRESS, - LENS_CUSTOM_FILTERS, - LENS_NAMESPACE_PREFIX, - TAPE_APP_NAME -} from '@dragverse/constants'; + DRAGVERSE_ADMIN_ADDRESS, + LENS_CUSTOM_FILTERS, + LENS_NAMESPACE_PREFIX, + TAPE_APP_NAME +} from '@dragverse/constants' import { - getProfile, - getProfilePicture, - splitNumber, - trimify -} from '@dragverse/generic'; -import type { Profile, RecipientDataInput } from '@dragverse/lens'; -import { LimitType, useSearchProfilesLazyQuery } from '@dragverse/lens'; + getProfile, + getProfilePicture, + splitNumber, + trimify +} from '@dragverse/generic' +import type { Profile, RecipientDataInput } from '@dragverse/lens' +import { LimitType, useSearchProfilesLazyQuery } from '@dragverse/lens' import { - InfoOutline, - Input, - Spinner, - TimesOutline, - Tooltip -} from '@dragverse/ui'; -import useAppStore from '@lib/store'; -import type { FC, RefObject } from 'react'; -import { useEffect, useRef, useState } from 'react'; -import { isAddress } from 'viem'; + InfoOutline, + Input, + Spinner, + TimesOutline, + Tooltip +} from '@dragverse/ui' +import useAppStore from '@lib/store' +import type { FC, RefObject } from 'react' +import { useEffect, useRef, useState } from 'react' +import { isAddress } from 'viem' type Props = { submitContainerRef: RefObject @@ -181,7 +181,7 @@ const Splits: FC = ({ submitContainerRef }) => { !getIsValidAddress(splitRecipients[i].recipient) ? (
{profilesLoading && } {!profiles?.length && !profilesLoading ? ( diff --git a/apps/web/src/components/Create/CollectModule/index.tsx b/apps/web/src/components/Create/CollectModule/index.tsx index b094e6489..a55834c20 100644 --- a/apps/web/src/components/Create/CollectModule/index.tsx +++ b/apps/web/src/components/Create/CollectModule/index.tsx @@ -1,5 +1,5 @@ -import { EVENTS, Tower } from '@dragverse/generic'; -import type { CollectModuleType } from '@dragverse/lens/custom-types'; +import { EVENTS, Tower } from '@dragverse/generic' +import type { CollectModuleType } from '@dragverse/lens/custom-types' import { Button, Checkbox, @@ -7,16 +7,16 @@ import { Modal, SplitOutline, Tooltip -} from '@dragverse/ui'; -import useAppStore from '@lib/store'; -import useCollectStore from '@lib/store/idb/collect'; -import { useState } from 'react'; +} from '@dragverse/ui' +import useAppStore from '@lib/store' +import useCollectStore from '@lib/store/idb/collect' +import { useState } from 'react' -import ChargeQuestion from './ChargeQuestion'; -import CollectDuration from './CollectDuration'; -import EditionSize from './EditionSize'; -import FeeCollectForm from './FeeCollectForm'; -import PermissionQuestion from './PermissionQuestion'; +import ChargeQuestion from './ChargeQuestion' +import CollectDuration from './CollectDuration' +import EditionSize from './EditionSize' +import FeeCollectForm from './FeeCollectForm' +import PermissionQuestion from './PermissionQuestion' const CollectModule = () => { const [showModal, setShowModal] = useState(false) diff --git a/apps/web/src/components/Create/Details.tsx b/apps/web/src/components/Create/Details.tsx index ffe926bef..c51bd2449 100644 --- a/apps/web/src/components/Create/Details.tsx +++ b/apps/web/src/components/Create/Details.tsx @@ -1,24 +1,24 @@ -import EmojiPicker from '@components/UIElements/EmojiPicker'; -import InputMentions from '@components/UIElements/InputMentions'; -import { getFileFromDataURL, tw, uploadToIPFS } from '@dragverse/browser'; -import { checkIsBytesVideo } from '@dragverse/generic'; -import type { IPFSUploadResult } from '@dragverse/lens/custom-types'; -import { Button, Switch, Tooltip } from '@dragverse/ui'; -import { zodResolver } from '@hookform/resolvers/zod'; -import useAppStore from '@lib/store'; -import useCollectStore from '@lib/store/idb/collect'; -import type { FC } from 'react'; -import { useForm } from 'react-hook-form'; -import { toast } from 'react-hot-toast'; -import type { z } from 'zod'; -import { boolean, object, string } from 'zod'; +import EmojiPicker from '@components/UIElements/EmojiPicker' +import InputMentions from '@components/UIElements/InputMentions' +import { getFileFromDataURL, tw, uploadToIPFS } from '@dragverse/browser' +import { checkIsBytesVideo } from '@dragverse/generic' +import type { IPFSUploadResult } from '@dragverse/lens/custom-types' +import { Button, Switch, Tooltip } from '@dragverse/ui' +import { zodResolver } from '@hookform/resolvers/zod' +import useAppStore from '@lib/store' +import useCollectStore from '@lib/store/idb/collect' +import type { FC } from 'react' +import { useForm } from 'react-hook-form' +import { toast } from 'react-hot-toast' +import type { z } from 'zod' +import { boolean, object, string } from 'zod' -import CollectModule from './CollectModule'; -import DropZone from './DropZone'; -import MediaCategory from './MediaCategory'; -import MediaLicense from './MediaLicense'; -import ReferenceModule from './ReferenceModule'; -import SelectedMedia from './SelectedMedia'; +import CollectModule from './CollectModule' +import DropZone from './DropZone' +import MediaCategory from './MediaCategory' +import MediaLicense from './MediaLicense' +import ReferenceModule from './ReferenceModule' +import SelectedMedia from './SelectedMedia' const formSchema = object({ title: string() diff --git a/apps/web/src/components/Create/DropZone.tsx b/apps/web/src/components/Create/DropZone.tsx index d6ffc32df..0dee1257c 100644 --- a/apps/web/src/components/Create/DropZone.tsx +++ b/apps/web/src/components/Create/DropZone.tsx @@ -1,17 +1,17 @@ -import { tw, useDragAndDrop } from '@dragverse/browser'; +import { tw, useDragAndDrop } from '@dragverse/browser' import { ALLOWED_AUDIO_MIME_TYPES, ALLOWED_UPLOAD_MIME_TYPES, CREATOR_VIDEO_CATEGORIES -} from '@dragverse/constants'; -import { canUploadedToIpfs, logger } from '@dragverse/generic'; -import { Button, UploadOutline } from '@dragverse/ui'; -import useHandleWrongNetwork from '@hooks/useHandleWrongNetwork'; -import useAppStore from '@lib/store'; -import useProfileStore from '@lib/store/idb/profile'; -import fileReaderStream from 'filereader-stream'; -import React from 'react'; -import toast from 'react-hot-toast'; +} from '@dragverse/constants' +import { canUploadedToIpfs, logger } from '@dragverse/generic' +import { Button, UploadOutline } from '@dragverse/ui' +import useHandleWrongNetwork from '@hooks/useHandleWrongNetwork' +import useAppStore from '@lib/store' +import useProfileStore from '@lib/store/idb/profile' +import fileReaderStream from 'filereader-stream' +import React from 'react' +import toast from 'react-hot-toast' const DropZone = () => { const setUploadedMedia = useAppStore((state) => state.setUploadedMedia) diff --git a/apps/web/src/components/Create/IrysInfo.tsx b/apps/web/src/components/Create/IrysInfo.tsx index 3c9357c83..0afed2b10 100644 --- a/apps/web/src/components/Create/IrysInfo.tsx +++ b/apps/web/src/components/Create/IrysInfo.tsx @@ -1,6 +1,6 @@ -import { useIsMounted } from '@dragverse/browser'; -import { IRYS_CURRENCY, POLYGON_CHAIN_ID } from '@dragverse/constants'; -import { EVENTS, Tower, logger } from '@dragverse/generic'; +import { useIsMounted } from '@dragverse/browser' +import { IRYS_CURRENCY, POLYGON_CHAIN_ID } from '@dragverse/constants' +import { EVENTS, logger, Tower } from '@dragverse/generic' import { Button, Callout, @@ -10,13 +10,13 @@ import { RefreshOutline, Tooltip, WarningOutline -} from '@dragverse/ui'; -import type { WebIrys } from '@irys/sdk'; -import useAppStore from '@lib/store'; -import { useEffect, useState } from 'react'; -import toast from 'react-hot-toast'; -import { formatEther, formatGwei, formatUnits } from 'viem'; -import { useAccount, useBalance, useWalletClient } from 'wagmi'; +} from '@dragverse/ui' +import type { WebIrys } from '@irys/sdk' +import useAppStore from '@lib/store' +import { useEffect, useState } from 'react' +import toast from 'react-hot-toast' +import { formatEther, formatGwei, formatUnits } from 'viem' +import { useAccount, useBalance, useWalletClient } from 'wagmi' const IrysInfo = () => { const isMounted = useIsMounted() diff --git a/apps/web/src/components/Create/MediaCategory.tsx b/apps/web/src/components/Create/MediaCategory.tsx index a27b57af5..e58a92ad6 100644 --- a/apps/web/src/components/Create/MediaCategory.tsx +++ b/apps/web/src/components/Create/MediaCategory.tsx @@ -1,7 +1,7 @@ -import { CREATOR_VIDEO_CATEGORIES } from '@dragverse/constants'; -import { getCategoryByTag } from '@dragverse/generic'; -import { Select, SelectItem } from '@dragverse/ui'; -import useAppStore from '@lib/store'; +import { CREATOR_VIDEO_CATEGORIES } from '@dragverse/constants' +import { getCategoryByTag } from '@dragverse/generic' +import { Select, SelectItem } from '@dragverse/ui' +import useAppStore from '@lib/store' const MediaCategory = () => { const uploadedMedia = useAppStore((state) => state.uploadedMedia) diff --git a/apps/web/src/components/Create/MediaLicense.tsx b/apps/web/src/components/Create/MediaLicense.tsx index 00a38c211..41d4d70a0 100644 --- a/apps/web/src/components/Create/MediaLicense.tsx +++ b/apps/web/src/components/Create/MediaLicense.tsx @@ -1,6 +1,6 @@ -import { Select, SelectItem } from '@dragverse/ui'; -import { MetadataLicenseType } from '@lens-protocol/metadata'; -import useAppStore from '@lib/store'; +import { Select, SelectItem } from '@dragverse/ui' +import { MetadataLicenseType } from '@lens-protocol/metadata' +import useAppStore from '@lib/store' const MediaLicense = () => { const uploadedMedia = useAppStore((state) => state.uploadedMedia) diff --git a/apps/web/src/components/Create/ReferenceModule/index.tsx b/apps/web/src/components/Create/ReferenceModule/index.tsx index a9a7bcce5..77e95b35e 100644 --- a/apps/web/src/components/Create/ReferenceModule/index.tsx +++ b/apps/web/src/components/Create/ReferenceModule/index.tsx @@ -1,6 +1,6 @@ -import type { ReferenceModuleType } from '@dragverse/lens/custom-types'; -import { Select, SelectItem } from '@dragverse/ui'; -import useAppStore from '@lib/store'; +import type { ReferenceModuleType } from '@dragverse/lens/custom-types' +import { Select, SelectItem } from '@dragverse/ui' +import useAppStore from '@lib/store' const ReferenceModule = () => { const uploadedMedia = useAppStore((state) => state.uploadedMedia) diff --git a/apps/web/src/components/Create/SelectedMedia.tsx b/apps/web/src/components/Create/SelectedMedia.tsx index e8c8cd251..fd795264f 100644 --- a/apps/web/src/components/Create/SelectedMedia.tsx +++ b/apps/web/src/components/Create/SelectedMedia.tsx @@ -1,19 +1,19 @@ -import { tw, uploadToIPFS } from '@dragverse/browser'; -import { ALLOWED_AUDIO_MIME_TYPES, FEATURE_FLAGS } from '@dragverse/constants'; +import { tw, uploadToIPFS } from '@dragverse/browser' +import { ALLOWED_AUDIO_MIME_TYPES, FEATURE_FLAGS } from '@dragverse/constants' import { - formatBytes, - getIsFeatureEnabled, - sanitizeDStorageUrl -} from '@dragverse/generic'; -import type { IPFSUploadResult } from '@dragverse/lens/custom-types'; -import { AddImageOutline, Badge, Input, Spinner, Tooltip } from '@dragverse/ui'; -import { getTimeFromSeconds } from '@lib/formatTime'; -import useAppStore from '@lib/store'; -import useProfileStore from '@lib/store/idb/profile'; -import { useEffect, useRef, useState } from 'react'; + formatBytes, + getIsFeatureEnabled, + sanitizeDStorageUrl +} from '@dragverse/generic' +import type { IPFSUploadResult } from '@dragverse/lens/custom-types' +import { AddImageOutline, Badge, Input, Spinner, Tooltip } from '@dragverse/ui' +import { getTimeFromSeconds } from '@lib/formatTime' +import useAppStore from '@lib/store' +import useProfileStore from '@lib/store/idb/profile' +import { useEffect, useRef, useState } from 'react' -import ChooseThumbnail from './ChooseThumbnail'; -import UploadMethod from './UploadMethod'; +import ChooseThumbnail from './ChooseThumbnail' +import UploadMethod from './UploadMethod' const SelectedMedia = () => { const mediaRef = useRef(null) @@ -66,7 +66,7 @@ const SelectedMedia = () => {