diff --git a/README.md b/README.md index 4527fb69..3ddfe3ca 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ a protocol for decentralized social apps: https://www.farcaster.xyz The Nounspace App follows the Atomic Design Pattern ![atomic_design](https://github.com/Nounspace/nounspace.ts/assets/7180740/2c892612-c730-4e74-bd32-3e7a8a6babbb) -Atoms and Moluclues can be found in the `src/common` foloder. Feel free to use existing ones or add your own. +Atoms and Moluclues can be found in the `src/shared/ui` foloder. Feel free to use existing ones or add your own. Fidgets are a type of Organism, fulfilling the role of sections of a page. To build Fidgets, please add them to the `src/fidgets` directory. diff --git a/src/fidgets/dummy.tsx b/src/fidgets/dummy.tsx new file mode 100644 index 00000000..e69de29b diff --git a/src/getNavigationCommands.ts b/src/getNavigationCommands.ts index 4c924005..ea12ccf1 100644 --- a/src/getNavigationCommands.ts +++ b/src/getNavigationCommands.ts @@ -1,5 +1,5 @@ import { NextRouter } from 'next/router' -import { CommandType } from './common/constants/commands'; +import { CommandType } from './space/common/constants/commands'; import { MagnifyingGlassIcon, RectangleGroupIcon } from '@heroicons/react/20/solid'; import { BellIcon } from '@heroicons/react/24/outline'; import { Bars3BottomLeftIcon } from "@heroicons/react/20/solid"; diff --git a/src/getThemeCommands.ts b/src/getThemeCommands.ts index 7063286b..4c38026e 100644 --- a/src/getThemeCommands.ts +++ b/src/getThemeCommands.ts @@ -1,5 +1,5 @@ -import { CommandType } from './common/constants/commands'; +import { CommandType } from './space/common/constants/commands'; import { ArrowPathRoundedSquareIcon, ComputerDesktopIcon, MoonIcon, SunIcon } from '@heroicons/react/20/solid'; export const getThemeCommands = (theme: string, setTheme: (theme: string) => void): CommandType[] => ( diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index 01e0c26b..47b173cd 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -3,16 +3,17 @@ import "@rainbow-me/rainbowkit/styles.css"; import React, { useEffect } from "react"; import type { AppProps } from "next/app"; -import { ThemeProvider } from "@/common/hooks/ThemeProvider"; +import { ThemeProvider } from "@/space/common/hooks/ThemeProvider"; import { RainbowKitProvider } from "@rainbow-me/rainbowkit"; -import CommandPalette from "@/common/components/CommandPalette"; +import CommandPalette from "@/space/common/components/CommandPalette"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { WagmiProvider } from "wagmi"; -import { rainbowKitTheme, config } from "@/common/helpers/rainbowkit"; -import Home from "@/home"; +import { rainbowKitTheme, config } from "@/space/common/helpers/rainbowkit"; +import Home from "@/space/home"; import { PostHogProvider } from "posthog-js/react"; -import { loadPosthogAnalytics } from "@/lib/analytics"; +import { loadPosthogAnalytics } from "@/space/lib/analytics"; import { useRouter } from "next/router"; +import Head from "next/head"; const posthog = loadPosthogAnalytics(); @@ -46,13 +47,18 @@ export default function MyApp({ Component, pageProps }: AppProps) { ); return ( - - {children} - + <> + + Nounspace + + + {children} + + ); } diff --git a/src/pages/_document.tsx b/src/pages/_document.tsx index a5251da8..0b7bbea6 100644 --- a/src/pages/_document.tsx +++ b/src/pages/_document.tsx @@ -6,7 +6,6 @@ export default function Document() { return ( - herocast diff --git a/src/pages/accounts/index.tsx b/src/pages/accounts/index.tsx index 21558d97..5960f72d 100644 --- a/src/pages/accounts/index.tsx +++ b/src/pages/accounts/index.tsx @@ -9,13 +9,13 @@ import { ArrowDownTrayIcon, NewspaperIcon } from "@heroicons/react/24/solid"; import { JoinedHerocastPostDraft, useNewPostStore, -} from "@/stores/useNewPostStore"; -import { hydrate, useAccountStore } from "@/stores/useAccountStore"; +} from "@/space/stores/useNewPostStore"; +import { hydrate, useAccountStore } from "@/space/stores/useAccountStore"; import { isEmpty } from "lodash"; import { AccountPlatformType, AccountStatusType, -} from "@/common/constants/accounts"; +} from "@/space/common/constants/accounts"; import { Card, CardContent, @@ -23,10 +23,10 @@ import { CardFooter, CardHeader, CardTitle, -} from "@/components/ui/card"; -import { Button } from "@/components/ui/button"; -import { QrCode } from "@/common/components/QrCode"; -import ConnectFarcasterAccountViaHatsProtocol from "@/common/components/ConnectFarcasterAccountViaHatsProtocol"; +} from "@/shared/ui/card"; +import { Button } from "@/shared/ui/button"; +import { QrCode } from "@/space/common/components/QrCode"; +import ConnectFarcasterAccountViaHatsProtocol from "@/space/common/components/ConnectFarcasterAccountViaHatsProtocol"; import { useAccount } from "wagmi"; import { WarpcastLoginStatus, @@ -34,14 +34,14 @@ import { createSignerRequest, generateWarpcastSigner, getWarpcastSignerStatus, -} from "@/common/helpers/warpcastLogin"; -import HelpCard from "@/common/components/HelpCard"; -import { useIsMounted } from "@/common/helpers/hooks"; +} from "@/space/common/helpers/warpcastLogin"; +import HelpCard from "@/space/common/components/HelpCard"; +import { useIsMounted } from "@/space/common/helpers/hooks"; import { useRouter } from "next/router"; import { NeynarAPIClient } from "@neynar/nodejs-sdk"; -import { openWindow } from "@/common/helpers/navigation"; -import ConfirmOnchainSignerButton from "@/common/components/ConfirmOnchainSignerButton"; -import SwitchWalletButton from "@/common/components/SwitchWalletButton"; +import { openWindow } from "@/space/common/helpers/navigation"; +import ConfirmOnchainSignerButton from "@/space/common/components/ConfirmOnchainSignerButton"; +import SwitchWalletButton from "@/space/common/components/SwitchWalletButton"; const APP_FID = Number(process.env.NEXT_PUBLIC_APP_FID!); diff --git a/src/pages/api/auth/confirm.tsx b/src/pages/api/auth/confirm.tsx index f396081a..1c27c4ac 100644 --- a/src/pages/api/auth/confirm.tsx +++ b/src/pages/api/auth/confirm.tsx @@ -1,7 +1,7 @@ import { type EmailOtpType } from '@supabase/supabase-js' import type { NextApiRequest, NextApiResponse } from 'next' -import createClient from '@/common/helpers/supabase/api' +import createClient from '@/space/common/helpers/supabase/api' function stringOrFirstString(item: string | string[] | undefined) { return Array.isArray(item) ? item[0] : item diff --git a/src/pages/api/signerRequest.ts b/src/pages/api/signerRequest.ts index 396ff4e4..8a1b4c15 100644 --- a/src/pages/api/signerRequest.ts +++ b/src/pages/api/signerRequest.ts @@ -1,5 +1,5 @@ import type { NextApiRequest, NextApiResponse } from 'next' -import { createSignerRequest, getSignerRequestStatus } from '@/common/helpers/warpcastLogin'; +import { createSignerRequest, getSignerRequestStatus } from '@/space/common/helpers/warpcastLogin'; export default async function handler(req: NextApiRequest, res: NextApiResponse) { const requestMethod = req.method; diff --git a/src/pages/channels/index.tsx b/src/pages/channels/index.tsx index 106929e5..f98562db 100644 --- a/src/pages/channels/index.tsx +++ b/src/pages/channels/index.tsx @@ -1,8 +1,8 @@ import React, { useState } from "react"; -import { useAccountStore } from "@/stores/useAccountStore"; -import { classNames } from "@/common/helpers/css"; -import { ChannelType } from "@/common/constants/channels"; -import Toggle from "@/common/components/Toggle"; +import { useAccountStore } from "@/space/stores/useAccountStore"; +import { classNames } from "@/space/common/helpers/css"; +import { ChannelType } from "@/space/common/constants/channels"; +import Toggle from "@/space/common/components/Toggle"; import { MagnifyingGlassIcon } from "@heroicons/react/20/solid"; import SortableList, { SortableItem } from "react-easy-sort"; import { useRouter } from "next/router"; diff --git a/src/pages/farcaster-signup/index.tsx b/src/pages/farcaster-signup/index.tsx index f9136398..254b9d83 100644 --- a/src/pages/farcaster-signup/index.tsx +++ b/src/pages/farcaster-signup/index.tsx @@ -1,13 +1,13 @@ import React, { ReactNode, useEffect, useState } from "react"; -import { Separator } from "@/components/ui/separator"; -import { Button } from "@/components/ui/button"; -import StepSequence from "@/common/components/Steps/StepSequence"; -import RegisterFarcasterUsernameForm from "@/common/components/RegisterFarcasterUsernameForm"; -import CreateFarcasterAccount from "@/common/components/CreateFarcasterAccount"; +import { Separator } from "@/shared/ui/separator"; +import { Button } from "@/shared/ui/button"; +import StepSequence from "@/space/common/components/Steps/StepSequence"; +import RegisterFarcasterUsernameForm from "@/space/common/components/RegisterFarcasterUsernameForm"; +import CreateFarcasterAccount from "@/space/common/components/CreateFarcasterAccount"; import { useAccount } from "wagmi"; import { useRouter } from "next/router"; import { useAccountModal, useConnectModal } from "@rainbow-me/rainbowkit"; -import SwitchWalletButton from "@/common/components/SwitchWalletButton"; +import SwitchWalletButton from "@/space/common/components/SwitchWalletButton"; enum FarcasterSignupNav { login = "LOGIN", diff --git a/src/pages/feed/index.tsx b/src/pages/feed/index.tsx index ea9677b9..6e252b9f 100644 --- a/src/pages/feed/index.tsx +++ b/src/pages/feed/index.tsx @@ -3,27 +3,27 @@ import { AccountObjectType, CUSTOM_CHANNELS, useAccountStore, -} from "@/stores/useAccountStore"; -import { CastType } from "@/common/constants/farcaster"; +} from "@/space/stores/useAccountStore"; +import { CastType } from "@/space/common/constants/farcaster"; import { useHotkeys } from "react-hotkeys-hook"; import { get, isEmpty, uniqBy } from "lodash"; -import { CastRow } from "@/common/components/CastRow"; -import { CastThreadView } from "@/common/components/CastThreadView"; -import { DEFAULT_FEED_PAGE_SIZE } from "@/common/helpers/neynar"; -import { SelectableListWithHotkeys } from "@/common/components/SelectableListWithHotkeys"; +import { CastRow } from "@/space/common/components/CastRow"; +import { CastThreadView } from "@/space/common/components/CastThreadView"; +import { DEFAULT_FEED_PAGE_SIZE } from "@/space/common/helpers/neynar"; +import { SelectableListWithHotkeys } from "@/space/common/components/SelectableListWithHotkeys"; import { Key } from "ts-key-enum"; -import ReplyModal from "@/common/components/ReplyModal"; -import EmbedsModal from "@/common/components/EmbedsModal"; +import ReplyModal from "@/space/common/components/ReplyModal"; +import EmbedsModal from "@/space/common/components/EmbedsModal"; import { useInView } from "react-intersection-observer"; import { useRouter } from "next/router"; -import { Button } from "@/components/ui/button"; +import { Button } from "@/shared/ui/button"; import { FilterType, NeynarAPIClient } from "@neynar/nodejs-sdk"; import { CastWithInteractions, FeedType, } from "@neynar/nodejs-sdk/build/neynar-api/v2"; -import { Loading } from "@/common/components/Loading"; -import BigOptionSelector from "@/common/components/BigOptionSelector"; +import { Loading } from "@/space/common/components/Loading"; +import BigOptionSelector from "@/space/common/components/BigOptionSelector"; type FeedsType = { [key: string]: CastWithInteractions[]; diff --git a/src/pages/hats/index.tsx b/src/pages/hats/index.tsx index 657765ac..95595fba 100644 --- a/src/pages/hats/index.tsx +++ b/src/pages/hats/index.tsx @@ -1,23 +1,23 @@ import React, { ReactNode, useEffect, useState } from "react"; -import { Separator } from "@/components/ui/separator"; -import StepSequence from "@/common/components/Steps/StepSequence"; -import { Button } from "@/components/ui/button"; -import { Input } from "@/components/ui/input"; -import { Label } from "@/components/ui/label"; +import { Separator } from "@/shared/ui/separator"; +import StepSequence from "@/space/common/components/Steps/StepSequence"; +import { Button } from "@/shared/ui/button"; +import { Input } from "@/shared/ui/input"; +import { Label } from "@/shared/ui/label"; import { ClipboardDocumentIcon } from "@heroicons/react/20/solid"; import { useAccount, useReadContract } from "wagmi"; import { NeynarAPIClient } from "@neynar/nodejs-sdk"; import { User } from "@neynar/nodejs-sdk/build/neynar-api/v2"; -import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; -import BigOptionSelector from "@/common/components/BigOptionSelector"; -import SharedAccountOwnershipSetup from "@/common/components/SharedAccountOwnershipSetup"; -import TransferAccountToHatsDelegator from "@/common/components/TransferAccountToHatsDelegator"; -import { openWindow } from "@/common/helpers/navigation"; -import { ID_REGISTRY } from "@/common/constants/contracts/id-registry"; +import { Avatar, AvatarFallback, AvatarImage } from "@/shared/ui/avatar"; +import BigOptionSelector from "@/space/common/components/BigOptionSelector"; +import SharedAccountOwnershipSetup from "@/space/common/components/SharedAccountOwnershipSetup"; +import TransferAccountToHatsDelegator from "@/space/common/components/TransferAccountToHatsDelegator"; +import { openWindow } from "@/space/common/helpers/navigation"; +import { ID_REGISTRY } from "@/space/common/constants/contracts/id-registry"; import { isEmpty } from "lodash"; import clsx from "clsx"; -import SwitchWalletButton from "@/common/components/SwitchWalletButton"; -import { Loading } from "@/common/components/Loading"; +import SwitchWalletButton from "@/space/common/components/SwitchWalletButton"; +import { Loading } from "@/space/common/components/Loading"; enum HatsSignupNav { select_account = "SELECT_ACCOUNT", diff --git a/src/pages/index.tsx b/src/pages/index.tsx index e58222ca..5f504713 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,6 +1,6 @@ import React, { useEffect } from "react"; import { useRouter } from "next/router"; -import { createClient } from "@/common/helpers/supabase/component"; +import { createClient } from "@/space/common/helpers/supabase/component"; const Index = () => { const router = useRouter(); diff --git a/src/pages/login/index.tsx b/src/pages/login/index.tsx index a3d4a1c2..eeeef6d9 100644 --- a/src/pages/login/index.tsx +++ b/src/pages/login/index.tsx @@ -1,9 +1,9 @@ import "@farcaster/auth-kit/styles.css"; import React from "react"; -import { UserAuthForm } from "@/common/components/UserAuthForm"; +import { UserAuthForm } from "@/space/common/components/UserAuthForm"; import { AuthKitProvider } from "@farcaster/auth-kit"; -import { Button } from "@/components/ui/button"; -import { openWindow } from "@/common/helpers/navigation"; +import { Button } from "@/shared/ui/button"; +import { openWindow } from "@/space/common/helpers/navigation"; import Link from "next/link"; import clsx from "clsx"; diff --git a/src/pages/notifications/index.tsx b/src/pages/notifications/index.tsx index d5170d77..b2dbd93e 100644 --- a/src/pages/notifications/index.tsx +++ b/src/pages/notifications/index.tsx @@ -1,15 +1,15 @@ import React, { useEffect, useState } from "react"; -import { castTextStyle, classNames } from "@/common/helpers/css"; -import { useAccountStore } from "@/stores/useAccountStore"; -import { SelectableListWithHotkeys } from "@/common/components/SelectableListWithHotkeys"; -import { localize, timeDiff } from "@/common/helpers/date"; -import { CastThreadView } from "@/common/components/CastThreadView"; +import { castTextStyle, classNames } from "@/space/common/helpers/css"; +import { useAccountStore } from "@/space/stores/useAccountStore"; +import { SelectableListWithHotkeys } from "@/space/common/components/SelectableListWithHotkeys"; +import { localize, timeDiff } from "@/space/common/helpers/date"; +import { CastThreadView } from "@/space/common/components/CastThreadView"; import { isEmpty } from "lodash"; import { useHotkeys } from "react-hotkeys-hook"; import { Key } from "ts-key-enum"; -import { CastType } from "@/common/constants/farcaster"; -import ReplyModal from "@/common/components/ReplyModal"; +import { CastType } from "@/space/common/constants/farcaster"; +import ReplyModal from "@/space/common/components/ReplyModal"; import { NeynarAPIClient } from "@neynar/nodejs-sdk"; import { CastWithInteractions } from "@neynar/nodejs-sdk/build/neynar-api/v1"; diff --git a/src/pages/post/index.tsx b/src/pages/post/index.tsx index b11c3f6a..c856766e 100644 --- a/src/pages/post/index.tsx +++ b/src/pages/post/index.tsx @@ -1,11 +1,11 @@ -import NewPostEntry from "@/common/components/NewPostEntry"; -import { classNames } from "@/common/helpers/css"; -import { useNewPostStore } from "@/stores/useNewPostStore"; +import NewPostEntry from "@/space/common/components/NewPostEntry"; +import { classNames } from "@/space/common/helpers/css"; +import { useNewPostStore } from "@/space/stores/useNewPostStore"; import React, { useEffect, useState } from "react"; import { PlusCircleIcon, TrashIcon } from "@heroicons/react/24/outline"; import * as Tooltip from "@radix-ui/react-tooltip"; -import HotkeyTooltipWrapper from "@/common/components/HotkeyTooltipWrapper"; -import { Button } from "@/components/ui/button"; +import HotkeyTooltipWrapper from "@/space/common/components/HotkeyTooltipWrapper"; +import { Button } from "@/shared/ui/button"; export default function NewPost() { const [showToast, setShowToast] = useState(false); diff --git a/src/pages/profile/[slug].tsx b/src/pages/profile/[slug].tsx index c9ac9e20..c16b34a5 100644 --- a/src/pages/profile/[slug].tsx +++ b/src/pages/profile/[slug].tsx @@ -6,17 +6,17 @@ import { AvatarImage, AvatarFallback, Avatar, -} from "@/components/ui/avatar"; -import { CardHeader, Card } from "@/components/ui/card"; -import { SelectableListWithHotkeys } from "@/common/components/SelectableListWithHotkeys"; -import { CastRow } from "@/common/components/CastRow"; +} from "@/shared/ui/avatar"; +import { CardHeader, Card } from "@/shared/ui/card"; +import { SelectableListWithHotkeys } from "@/space/common/components/SelectableListWithHotkeys"; +import { CastRow } from "@/space/common/components/CastRow"; import { CastWithInteractions } from "@neynar/nodejs-sdk/build/neynar-api/v2/openapi-farcaster/models/cast-with-interactions"; -import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs"; +import { Tabs, TabsList, TabsTrigger } from "@/shared/ui/tabs"; import { uniqBy } from "lodash"; import { useHotkeys } from "react-hotkeys-hook"; -import FollowButton from "@/common/components/FollowButton"; -import { useAccountStore } from "@/stores/useAccountStore"; -import { useDataStore } from "@/stores/useDataStore"; +import FollowButton from "@/space/common/components/FollowButton"; +import { useAccountStore } from "@/space/stores/useAccountStore"; +import { useDataStore } from "@/space/stores/useDataStore"; const APP_FID = Number(process.env.NEXT_PUBLIC_APP_FID!); diff --git a/src/pages/search/index.tsx b/src/pages/search/index.tsx index 6fe37b37..0f10844b 100644 --- a/src/pages/search/index.tsx +++ b/src/pages/search/index.tsx @@ -1,11 +1,11 @@ import React, { useEffect, useRef, useState } from "react"; import { InformationCircleIcon, MagnifyingGlassIcon } from "@heroicons/react/24/outline"; -import { searchForText, SearchResultCast } from "@/common/helpers/searchcaster"; -import { SelectableListWithHotkeys } from "@/common/components/SelectableListWithHotkeys"; +import { searchForText, SearchResultCast } from "@/space/common/helpers/searchcaster"; +import { SelectableListWithHotkeys } from "@/space/common/components/SelectableListWithHotkeys"; import { debounce } from "lodash"; -import { CastRow } from "@/common/components/CastRow"; -import { CastType } from "@/common/constants/farcaster"; -import { getUrlsInText } from "@/common/helpers/text"; +import { CastRow } from "@/space/common/components/CastRow"; +import { CastType } from "@/space/common/constants/farcaster"; +import { getUrlsInText } from "@/space/common/helpers/text"; // export type CastType = { diff --git a/src/pages/settings/index.tsx b/src/pages/settings/index.tsx index 68df2898..e871af69 100644 --- a/src/pages/settings/index.tsx +++ b/src/pages/settings/index.tsx @@ -1,8 +1,8 @@ import React, { useEffect, useState } from "react"; -import AlertDialogDemo from "@/common/components/AlertDialog"; -import HelpCard from "@/common/components/HelpCard"; -import { classNames } from "@/common/helpers/css"; -import { Button } from "@/components/ui/button"; +import AlertDialogDemo from "@/space/common/components/AlertDialog"; +import HelpCard from "@/space/common/components/HelpCard"; +import { classNames } from "@/space/common/helpers/css"; +import { Button } from "@/shared/ui/button"; import { AccountObjectType, PENDING_ACCOUNT_NAME_PLACEHOLDER, @@ -10,20 +10,20 @@ import { channelCommands, hydrate, useAccountStore, -} from "@/stores/useAccountStore"; -import { newPostCommands } from "@/stores/useNewPostStore"; +} from "@/space/stores/useAccountStore"; +import { newPostCommands } from "@/space/stores/useNewPostStore"; import { User } from "@supabase/supabase-js"; import { useRouter } from "next/router"; import { getNavigationCommands } from "@/getNavigationCommands"; -import AccountManagementModal from "@/common/components/AccountManagement/AccountManagementModal"; +import AccountManagementModal from "@/space/common/components/AccountManagement/AccountManagementModal"; import { useAccount } from "wagmi"; import { useAccountModal, useConnectModal } from "@rainbow-me/rainbowkit"; -import { AccountPlatformType } from "@/common/constants/accounts"; -import { Loading } from "@/common/components/Loading"; +import { AccountPlatformType } from "@/space/common/constants/accounts"; +import { Loading } from "@/space/common/components/Loading"; import { ArrowPathIcon } from "@heroicons/react/20/solid"; -import { getUsernameForFid, updateUsername } from "@/common/helpers/farcaster"; -import SwitchWalletButton from "@/common/components/SwitchWalletButton"; -import { createClient } from "@/common/helpers/supabase/component"; +import { getUsernameForFid, updateUsername } from "@/space/common/helpers/farcaster"; +import SwitchWalletButton from "@/space/common/components/SwitchWalletButton"; +import { createClient } from "@/space/common/helpers/supabase/component"; import { usePostHog } from "posthog-js/react"; type SimpleCommand = { diff --git a/src/pages/welcome/index.tsx b/src/pages/welcome/index.tsx index f44c7b00..f7cc8128 100644 --- a/src/pages/welcome/index.tsx +++ b/src/pages/welcome/index.tsx @@ -1,7 +1,7 @@ import React, { } from "react"; -import { Separator } from "@/components/ui/separator"; +import { Separator } from "@/shared/ui/separator"; import { useRouter } from "next/router"; -import BigOptionSelector from "@/common/components/BigOptionSelector"; +import BigOptionSelector from "@/space/common/components/BigOptionSelector"; export default function Welcome() { const router = useRouter(); diff --git a/src/components/ui/aspect-ratio.tsx b/src/shared/ui/aspect-ratio.tsx similarity index 100% rename from src/components/ui/aspect-ratio.tsx rename to src/shared/ui/aspect-ratio.tsx diff --git a/src/components/ui/avatar.tsx b/src/shared/ui/avatar.tsx similarity index 97% rename from src/components/ui/avatar.tsx rename to src/shared/ui/avatar.tsx index 991f56ec..e7166179 100644 --- a/src/components/ui/avatar.tsx +++ b/src/shared/ui/avatar.tsx @@ -1,7 +1,7 @@ import * as React from "react" import * as AvatarPrimitive from "@radix-ui/react-avatar" -import { cn } from "@/lib/utils" +import { cn } from "@/space/lib/utils" const Avatar = React.forwardRef< React.ElementRef, diff --git a/src/components/ui/badge.tsx b/src/shared/ui/badge.tsx similarity index 96% rename from src/components/ui/badge.tsx rename to src/shared/ui/badge.tsx index af6f3b41..eb456584 100644 --- a/src/components/ui/badge.tsx +++ b/src/shared/ui/badge.tsx @@ -1,7 +1,7 @@ import * as React from "react" import { cva, type VariantProps } from "class-variance-authority" -import { cn } from "@/lib/utils" +import { cn } from "@/space/lib/utils" const badgeVariants = cva( "inline-flex items-center rounded-md border px-1.5 py-0.5 text-xs font-normal transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", diff --git a/src/components/ui/button.tsx b/src/shared/ui/button.tsx similarity index 97% rename from src/components/ui/button.tsx rename to src/shared/ui/button.tsx index 4ecf3690..d68e0ec6 100644 --- a/src/components/ui/button.tsx +++ b/src/shared/ui/button.tsx @@ -2,7 +2,7 @@ import * as React from "react" import { Slot } from "@radix-ui/react-slot" import { cva, type VariantProps } from "class-variance-authority" -import { cn } from "@/lib/utils" +import { cn } from "@/space/lib/utils" const buttonVariants = cva( "inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50", diff --git a/src/components/ui/card.tsx b/src/shared/ui/card.tsx similarity index 97% rename from src/components/ui/card.tsx rename to src/shared/ui/card.tsx index 77e9fb78..5b232f8a 100644 --- a/src/components/ui/card.tsx +++ b/src/shared/ui/card.tsx @@ -1,6 +1,6 @@ import * as React from "react" -import { cn } from "@/lib/utils" +import { cn } from "@/space/lib/utils" const Card = React.forwardRef< HTMLDivElement, diff --git a/src/components/ui/command.tsx b/src/shared/ui/command.tsx similarity index 98% rename from src/components/ui/command.tsx rename to src/shared/ui/command.tsx index 8972494b..adef0d55 100644 --- a/src/components/ui/command.tsx +++ b/src/shared/ui/command.tsx @@ -4,8 +4,8 @@ import { type DialogProps } from "@radix-ui/react-dialog" import { MagnifyingGlassIcon } from "@radix-ui/react-icons" import { Command as CommandPrimitive } from "cmdk" -import { cn } from "@/lib/utils" -import { Dialog, DialogContent } from "@/components/ui/dialog" +import { cn } from "@/space/lib/utils" +import { Dialog, DialogContent } from "@/shared/ui/dialog" const Command = React.forwardRef< React.ElementRef, diff --git a/src/components/ui/dialog.tsx b/src/shared/ui/dialog.tsx similarity index 98% rename from src/components/ui/dialog.tsx rename to src/shared/ui/dialog.tsx index 5d16351f..10bf7446 100644 --- a/src/components/ui/dialog.tsx +++ b/src/shared/ui/dialog.tsx @@ -2,7 +2,7 @@ import * as React from "react" import * as DialogPrimitive from "@radix-ui/react-dialog" import { Cross2Icon } from "@radix-ui/react-icons" -import { cn } from "@/lib/utils" +import { cn } from "@/space/lib/utils" const Dialog = DialogPrimitive.Root diff --git a/src/components/ui/dropdown-menu.tsx b/src/shared/ui/dropdown-menu.tsx similarity index 99% rename from src/components/ui/dropdown-menu.tsx rename to src/shared/ui/dropdown-menu.tsx index 0e4dccfd..663fc4fa 100644 --- a/src/components/ui/dropdown-menu.tsx +++ b/src/shared/ui/dropdown-menu.tsx @@ -6,7 +6,7 @@ import { DotFilledIcon, } from "@radix-ui/react-icons" -import { cn } from "@/lib/utils" +import { cn } from "@/space/lib/utils" const DropdownMenu = DropdownMenuPrimitive.Root diff --git a/src/components/ui/form.tsx b/src/shared/ui/form.tsx similarity index 98% rename from src/components/ui/form.tsx rename to src/shared/ui/form.tsx index f6afdaf2..cf53d27c 100644 --- a/src/components/ui/form.tsx +++ b/src/shared/ui/form.tsx @@ -10,8 +10,8 @@ import { useFormContext, } from "react-hook-form" -import { cn } from "@/lib/utils" -import { Label } from "@/components/ui/label" +import { cn } from "@/space/lib/utils" +import { Label } from "@/shared/ui/label" const Form = FormProvider diff --git a/src/components/ui/hover-card.tsx b/src/shared/ui/hover-card.tsx similarity index 96% rename from src/components/ui/hover-card.tsx rename to src/shared/ui/hover-card.tsx index 863ff014..9c9c61de 100644 --- a/src/components/ui/hover-card.tsx +++ b/src/shared/ui/hover-card.tsx @@ -1,7 +1,7 @@ import * as React from "react" import * as HoverCardPrimitive from "@radix-ui/react-hover-card" -import { cn } from "@/lib/utils" +import { cn } from "@/space/lib/utils" const HoverCard = HoverCardPrimitive.Root diff --git a/src/components/ui/input.tsx b/src/shared/ui/input.tsx similarity index 95% rename from src/components/ui/input.tsx rename to src/shared/ui/input.tsx index e7302b9c..872ff05a 100644 --- a/src/components/ui/input.tsx +++ b/src/shared/ui/input.tsx @@ -1,6 +1,6 @@ import * as React from "react" -import { cn } from "@/lib/utils" +import { cn } from "@/space/lib/utils" export interface InputProps extends React.InputHTMLAttributes {} diff --git a/src/components/ui/label.tsx b/src/shared/ui/label.tsx similarity index 94% rename from src/components/ui/label.tsx rename to src/shared/ui/label.tsx index fd5f440a..f1e651ce 100644 --- a/src/components/ui/label.tsx +++ b/src/shared/ui/label.tsx @@ -2,7 +2,7 @@ import * as React from "react" import * as LabelPrimitive from "@radix-ui/react-label" import { cva, type VariantProps } from "class-variance-authority" -import { cn } from "@/lib/utils" +import { cn } from "@/space/lib/utils" const labelVariants = cva( "text-sm font-normal leading-0 peer-disabled:cursor-not-allowed peer-disabled:opacity-70" diff --git a/src/components/ui/popover.tsx b/src/shared/ui/popover.tsx similarity index 96% rename from src/components/ui/popover.tsx rename to src/shared/ui/popover.tsx index d82e7149..f971ddc2 100644 --- a/src/components/ui/popover.tsx +++ b/src/shared/ui/popover.tsx @@ -1,7 +1,7 @@ import * as React from "react" import * as PopoverPrimitive from "@radix-ui/react-popover" -import { cn } from "@/lib/utils" +import { cn } from "@/space/lib/utils" const Popover = PopoverPrimitive.Root diff --git a/src/components/ui/progress.tsx b/src/shared/ui/progress.tsx similarity index 95% rename from src/components/ui/progress.tsx rename to src/shared/ui/progress.tsx index 1278b819..70873c36 100644 --- a/src/components/ui/progress.tsx +++ b/src/shared/ui/progress.tsx @@ -1,7 +1,7 @@ import * as React from "react"; import * as ProgressPrimitive from "@radix-ui/react-progress"; -import { cn } from "@/lib/utils"; +import { cn } from "@/space/lib/utils"; type CustomProgressProps = { indicatorClassName?: string; diff --git a/src/components/ui/separator.tsx b/src/shared/ui/separator.tsx similarity index 94% rename from src/components/ui/separator.tsx rename to src/shared/ui/separator.tsx index 6d7f1226..a5117cce 100644 --- a/src/components/ui/separator.tsx +++ b/src/shared/ui/separator.tsx @@ -1,7 +1,7 @@ import * as React from "react" import * as SeparatorPrimitive from "@radix-ui/react-separator" -import { cn } from "@/lib/utils" +import { cn } from "@/space/lib/utils" const Separator = React.forwardRef< React.ElementRef, diff --git a/src/components/ui/skeleton.tsx b/src/shared/ui/skeleton.tsx similarity index 86% rename from src/components/ui/skeleton.tsx rename to src/shared/ui/skeleton.tsx index f8eca253..ec5d408e 100644 --- a/src/components/ui/skeleton.tsx +++ b/src/shared/ui/skeleton.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { cn } from "@/lib/utils" +import { cn } from "@/space/lib/utils" function Skeleton({ className, diff --git a/src/components/ui/sonner.tsx b/src/shared/ui/sonner.tsx similarity index 100% rename from src/components/ui/sonner.tsx rename to src/shared/ui/sonner.tsx diff --git a/src/components/ui/switch.tsx b/src/shared/ui/switch.tsx similarity index 96% rename from src/components/ui/switch.tsx rename to src/shared/ui/switch.tsx index 455c23b6..64e04337 100644 --- a/src/components/ui/switch.tsx +++ b/src/shared/ui/switch.tsx @@ -1,7 +1,7 @@ import * as React from "react" import * as SwitchPrimitives from "@radix-ui/react-switch" -import { cn } from "@/lib/utils" +import { cn } from "@/space/lib/utils" const Switch = React.forwardRef< React.ElementRef, diff --git a/src/components/ui/tabs.tsx b/src/shared/ui/tabs.tsx similarity index 97% rename from src/components/ui/tabs.tsx rename to src/shared/ui/tabs.tsx index 85d83bea..f919efd9 100644 --- a/src/components/ui/tabs.tsx +++ b/src/shared/ui/tabs.tsx @@ -1,7 +1,7 @@ import * as React from "react" import * as TabsPrimitive from "@radix-ui/react-tabs" -import { cn } from "@/lib/utils" +import { cn } from "@/space/lib/utils" const Tabs = TabsPrimitive.Root diff --git a/src/components/ui/textarea.tsx b/src/shared/ui/textarea.tsx similarity index 94% rename from src/components/ui/textarea.tsx rename to src/shared/ui/textarea.tsx index d1258e47..845bafa8 100644 --- a/src/components/ui/textarea.tsx +++ b/src/shared/ui/textarea.tsx @@ -1,6 +1,6 @@ import * as React from "react" -import { cn } from "@/lib/utils" +import { cn } from "@/space/lib/utils" export interface TextareaProps extends React.TextareaHTMLAttributes {} diff --git a/src/components/ui/tooltip.tsx b/src/shared/ui/tooltip.tsx similarity index 96% rename from src/components/ui/tooltip.tsx rename to src/shared/ui/tooltip.tsx index a9c71baa..eaa6112e 100644 --- a/src/components/ui/tooltip.tsx +++ b/src/shared/ui/tooltip.tsx @@ -1,7 +1,7 @@ import * as React from "react" import * as TooltipPrimitive from "@radix-ui/react-tooltip" -import { cn } from "@/lib/utils" +import { cn } from "@/space/lib/utils" const TooltipProvider = TooltipPrimitive.Provider diff --git a/src/common/components/AccountManagement/AccountManagement.tsx b/src/space/common/components/AccountManagement/AccountManagement.tsx similarity index 91% rename from src/common/components/AccountManagement/AccountManagement.tsx rename to src/space/common/components/AccountManagement/AccountManagement.tsx index 1af5a7d0..d74c9153 100644 --- a/src/common/components/AccountManagement/AccountManagement.tsx +++ b/src/space/common/components/AccountManagement/AccountManagement.tsx @@ -1,6 +1,6 @@ import React from "react"; -import { AccountObjectType } from "@/stores/useAccountStore"; -import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; +import { AccountObjectType } from "@/space/stores/useAccountStore"; +import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/shared/ui/tabs"; import RenameAccountForm from "./RenameAccountForm"; type AccountManagementProps = { diff --git a/src/common/components/AccountManagement/AccountManagementModal.tsx b/src/space/common/components/AccountManagement/AccountManagementModal.tsx similarity index 90% rename from src/common/components/AccountManagement/AccountManagementModal.tsx rename to src/space/common/components/AccountManagement/AccountManagementModal.tsx index ac5f47a8..4466ad39 100644 --- a/src/common/components/AccountManagement/AccountManagementModal.tsx +++ b/src/space/common/components/AccountManagement/AccountManagementModal.tsx @@ -1,6 +1,6 @@ import React, { useEffect, useState } from "react"; import Modal from "../Modal"; -import { AccountObjectType } from "@/stores/useAccountStore"; +import { AccountObjectType } from "@/space/stores/useAccountStore"; import AccountManagement from "./AccountManagement"; type AccountManagementModalProps = { diff --git a/src/common/components/AccountManagement/RenameAccountForm.tsx b/src/space/common/components/AccountManagement/RenameAccountForm.tsx similarity index 97% rename from src/common/components/AccountManagement/RenameAccountForm.tsx rename to src/space/common/components/AccountManagement/RenameAccountForm.tsx index e783b947..850ddea6 100644 --- a/src/common/components/AccountManagement/RenameAccountForm.tsx +++ b/src/space/common/components/AccountManagement/RenameAccountForm.tsx @@ -9,9 +9,9 @@ import { FormItem, FormLabel, FormMessage, -} from "@/components/ui/form"; -import { Button } from "@/components/ui/button"; -import { Input } from "@/components/ui/input"; +} from "@/shared/ui/form"; +import { Button } from "@/shared/ui/button"; +import { Input } from "@/shared/ui/input"; import { useAccount, useWalletClient, @@ -27,10 +27,10 @@ import { setUserDataInProtocol, updateUsername, validateUsernameIsAvailable, -} from "@/common/helpers/farcaster"; +} from "@/space/common/helpers/farcaster"; import { getAddress } from "viem"; -import { AccountObjectType, PENDING_ACCOUNT_NAME_PLACEHOLDER, useAccountStore } from "@/stores/useAccountStore"; -import { AccountPlatformType } from "@/common/constants/accounts"; +import { AccountObjectType, PENDING_ACCOUNT_NAME_PLACEHOLDER, useAccountStore } from "@/space/stores/useAccountStore"; +import { AccountPlatformType } from "@/space/common/constants/accounts"; import { Cog6ToothIcon, ExclamationCircleIcon, diff --git a/src/common/components/AlertDialog.tsx b/src/space/common/components/AlertDialog.tsx similarity index 97% rename from src/common/components/AlertDialog.tsx rename to src/space/common/components/AlertDialog.tsx index 5519fd65..35c01d87 100644 --- a/src/common/components/AlertDialog.tsx +++ b/src/space/common/components/AlertDialog.tsx @@ -1,6 +1,6 @@ import React from 'react'; import * as AlertDialog from '@radix-ui/react-alert-dialog'; -import { Button } from '@/components/ui/button'; +import { Button } from '@/shared/ui/button'; type AlertDialogProps = { buttonText: string; diff --git a/src/common/components/BigOptionSelector.tsx b/src/space/common/components/BigOptionSelector.tsx similarity index 94% rename from src/common/components/BigOptionSelector.tsx rename to src/space/common/components/BigOptionSelector.tsx index d739b612..4cf5989d 100644 --- a/src/common/components/BigOptionSelector.tsx +++ b/src/space/common/components/BigOptionSelector.tsx @@ -6,8 +6,8 @@ import { CardFooter, CardHeader, CardTitle, -} from "@/components/ui/card"; -import { Button } from "@/components/ui/button"; +} from "@/shared/ui/card"; +import { Button } from "@/shared/ui/button"; type OptionSelectorType = { title: string; diff --git a/src/common/components/CashtagHoverCard.tsx b/src/space/common/components/CashtagHoverCard.tsx similarity index 94% rename from src/common/components/CashtagHoverCard.tsx rename to src/space/common/components/CashtagHoverCard.tsx index 99cb8cc5..98288cc2 100644 --- a/src/common/components/CashtagHoverCard.tsx +++ b/src/space/common/components/CashtagHoverCard.tsx @@ -3,14 +3,14 @@ import { HoverCard, HoverCardContent, HoverCardTrigger, -} from "@/components/ui/hover-card"; -import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; +} from "@/shared/ui/hover-card"; +import { Avatar, AvatarFallback, AvatarImage } from "@/shared/ui/avatar"; import { openWindow } from "../helpers/navigation"; import { Loading } from "./Loading"; import { useInView } from "react-intersection-observer"; -import { DexPair, PriceChange, useDataStore } from "@/stores/useDataStore"; +import { DexPair, PriceChange, useDataStore } from "@/space/stores/useDataStore"; import { get } from "lodash"; -import { Button } from "@/components/ui/button"; +import { Button } from "@/shared/ui/button"; import { ArrowTopRightOnSquareIcon } from "@heroicons/react/24/outline"; type CashtagHoverCardProps = { diff --git a/src/common/components/CastRow.tsx b/src/space/common/components/CastRow.tsx similarity index 98% rename from src/common/components/CastRow.tsx rename to src/space/common/components/CastRow.tsx index 5a7f6fa0..3b0b13ee 100644 --- a/src/common/components/CastRow.tsx +++ b/src/space/common/components/CastRow.tsx @@ -1,11 +1,11 @@ import React, { useState } from "react"; -import { castTextStyle, classNames } from "@/common/helpers/css"; +import { castTextStyle, classNames } from "@/space/common/helpers/css"; import { CastType, CastReactionType, -} from "@/common/constants/farcaster"; -import { ChannelType } from "@/common/constants/channels"; -import { useAccountStore } from "@/stores/useAccountStore"; +} from "@/space/common/constants/farcaster"; +import { ChannelType } from "@/space/common/constants/channels"; +import { useAccountStore } from "@/space/stores/useAccountStore"; import { ArrowPathRoundedSquareIcon, ArrowTopRightOnSquareIcon, diff --git a/src/common/components/CastThreadView.tsx b/src/space/common/components/CastThreadView.tsx similarity index 97% rename from src/common/components/CastThreadView.tsx rename to src/space/common/components/CastThreadView.tsx index fdc900db..4729934e 100644 --- a/src/common/components/CastThreadView.tsx +++ b/src/space/common/components/CastThreadView.tsx @@ -1,17 +1,17 @@ import React, { useEffect, useMemo, useState } from "react"; -import { CastType } from "@/common/constants/farcaster"; +import { CastType } from "@/space/common/constants/farcaster"; import { Loading } from "./Loading"; import { CastRow } from "./CastRow"; -import { useAccountStore } from "@/stores/useAccountStore"; +import { useAccountStore } from "@/space/stores/useAccountStore"; import NewPostEntry from "./NewPostEntry"; -import { useNewPostStore } from "@/stores/useNewPostStore"; +import { useNewPostStore } from "@/space/stores/useNewPostStore"; import { ArrowLeftIcon } from "@heroicons/react/24/solid"; import { SelectableListWithHotkeys } from "./SelectableListWithHotkeys"; import { openWindow } from "../helpers/navigation"; import { classNames } from "../helpers/css"; import HotkeyTooltipWrapper from "./HotkeyTooltipWrapper"; import * as Tooltip from "@radix-ui/react-tooltip"; -import { Button } from "@/components/ui/button"; +import { Button } from "@/shared/ui/button"; import clsx from "clsx"; import { CastParamType, NeynarAPIClient } from "@neynar/nodejs-sdk"; import { CastWithInteractions } from "@neynar/nodejs-sdk/build/neynar-api/v1"; diff --git a/src/common/components/ChannelList.tsx b/src/space/common/components/ChannelList.tsx similarity index 98% rename from src/common/components/ChannelList.tsx rename to src/space/common/components/ChannelList.tsx index 914b4d95..143b89d1 100644 --- a/src/common/components/ChannelList.tsx +++ b/src/space/common/components/ChannelList.tsx @@ -1,7 +1,7 @@ import React from "react"; import { Channel } from "@neynar/nodejs-sdk/build/neynar-api/v2"; import { forwardRef, useImperativeHandle, useState, useEffect } from "react"; -import { Skeleton } from "@/components/ui/skeleton"; +import { Skeleton } from "@/shared/ui/skeleton"; import clsx from "clsx"; type ChannelListRef = { diff --git a/src/common/components/ChannelPicker.tsx b/src/space/common/components/ChannelPicker.tsx similarity index 96% rename from src/common/components/ChannelPicker.tsx rename to src/space/common/components/ChannelPicker.tsx index 99a7c98d..d9777a77 100644 --- a/src/common/components/ChannelPicker.tsx +++ b/src/space/common/components/ChannelPicker.tsx @@ -1,17 +1,17 @@ import * as React from "react"; -import { Button } from "@/components/ui/button"; +import { Button } from "@/shared/ui/button"; import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, -} from "@/components/ui/command"; +} from "@/shared/ui/command"; import { Popover, PopoverContent, PopoverTrigger, -} from "@/components/ui/popover"; +} from "@/shared/ui/popover"; import { Channel } from "@mod-protocol/farcaster"; import { CaretDownIcon } from "@radix-ui/react-icons"; import { take, uniqBy } from "lodash"; diff --git a/src/common/components/ChannelsDropdown.tsx b/src/space/common/components/ChannelsDropdown.tsx similarity index 98% rename from src/common/components/ChannelsDropdown.tsx rename to src/space/common/components/ChannelsDropdown.tsx index 62eacbbb..d98e24cb 100644 --- a/src/common/components/ChannelsDropdown.tsx +++ b/src/space/common/components/ChannelsDropdown.tsx @@ -1,7 +1,7 @@ import React, { useState } from 'react'; import { CheckIcon, ChevronUpDownIcon } from '@heroicons/react/20/solid'; import { Combobox } from '@headlessui/react'; -import { useAccountStore } from '@/stores/useAccountStore'; +import { useAccountStore } from '@/space/stores/useAccountStore'; import { ChannelType } from '../constants/channels'; import { classNames } from '../helpers/css'; diff --git a/src/common/components/CommandPalette/index.tsx b/src/space/common/components/CommandPalette/index.tsx similarity index 96% rename from src/common/components/CommandPalette/index.tsx rename to src/space/common/components/CommandPalette/index.tsx index 68828fae..a1fc653a 100644 --- a/src/common/components/CommandPalette/index.tsx +++ b/src/space/common/components/CommandPalette/index.tsx @@ -1,9 +1,9 @@ import React, { Fragment, useState } from 'react'; -import { CommandType } from "@/common/constants/commands"; -import { classNames } from "@/common/helpers/css"; -import { accountCommands, channelCommands, useAccountStore } from '@/stores/useAccountStore'; -import { useNavigationStore } from "@/stores/useNavigationStore"; -import { newPostCommands } from "@/stores/useNewPostStore"; +import { CommandType } from "@/space/common/constants/commands"; +import { classNames } from "@/space/common/helpers/css"; +import { accountCommands, channelCommands, useAccountStore } from '@/space/stores/useAccountStore'; +import { useNavigationStore } from "@/space/stores/useNavigationStore"; +import { newPostCommands } from "@/space/stores/useNewPostStore"; import { Combobox, Dialog, Transition } from '@headlessui/react'; import { MagnifyingGlassIcon } from '@heroicons/react/20/solid'; import { FaceSmileIcon } from '@heroicons/react/24/outline'; diff --git a/src/common/components/ConfirmOnchainSignerButton.tsx b/src/space/common/components/ConfirmOnchainSignerButton.tsx similarity index 98% rename from src/common/components/ConfirmOnchainSignerButton.tsx rename to src/space/common/components/ConfirmOnchainSignerButton.tsx index fb89fbca..680b53a6 100644 --- a/src/common/components/ConfirmOnchainSignerButton.tsx +++ b/src/space/common/components/ConfirmOnchainSignerButton.tsx @@ -8,7 +8,7 @@ import { useSwitchChain, useWaitForTransactionReceipt, } from "wagmi"; -import { Button } from "@/components/ui/button"; +import { Button } from "@/shared/ui/button"; import { KEY_REGISTRY } from "../constants/contracts/key-registry"; import { CheckCircleIcon, Cog6ToothIcon } from "@heroicons/react/24/solid"; import { ID_REGISTRY } from "../constants/contracts/id-registry"; @@ -17,7 +17,7 @@ import { AccountObjectType, hydrate, useAccountStore, -} from "@/stores/useAccountStore"; +} from "@/space/stores/useAccountStore"; import { isEmpty } from "lodash"; import { useAccountModal } from "@rainbow-me/rainbowkit"; import { getChainId } from "@wagmi/core"; @@ -27,7 +27,7 @@ import SwitchWalletButton from "./SwitchWalletButton"; import { KEY_GATEWAY } from "../constants/contracts/key-gateway"; import { getSignedKeyRequestMetadataFromAppAccount } from "../helpers/farcaster"; import { NeynarAPIClient } from "@neynar/nodejs-sdk"; -import { Label } from "@/components/ui/label"; +import { Label } from "@/shared/ui/label"; const APP_FID = process.env.NEXT_PUBLIC_APP_FID!; const APP_MNENOMIC = process.env.NEXT_PUBLIC_APP_MNENOMIC!; diff --git a/src/common/components/ConnectFarcasterAccountViaHatsProtocol.tsx b/src/space/common/components/ConnectFarcasterAccountViaHatsProtocol.tsx similarity index 95% rename from src/common/components/ConnectFarcasterAccountViaHatsProtocol.tsx rename to src/space/common/components/ConnectFarcasterAccountViaHatsProtocol.tsx index aa5f7bc1..9f39d2a2 100644 --- a/src/common/components/ConnectFarcasterAccountViaHatsProtocol.tsx +++ b/src/space/common/components/ConnectFarcasterAccountViaHatsProtocol.tsx @@ -6,18 +6,18 @@ import { CardFooter, CardHeader, CardTitle, -} from "@/components/ui/card"; -import { Button } from "@/components/ui/button"; +} from "@/shared/ui/card"; +import { Button } from "@/shared/ui/button"; import { useAccountModal, useConnectModal } from "@rainbow-me/rainbowkit"; import { useAccount, useSignTypedData, useWaitForTransactionReceipt, } from "wagmi"; -import { Input } from "@/components/ui/input"; +import { Input } from "@/shared/ui/input"; import { HatsFarcasterDelegatorAbi, -} from "@/common/constants/contracts/HatsFarcasterDelegator"; +} from "@/space/common/constants/contracts/HatsFarcasterDelegator"; import { encodeAbiParameters, encodePacked, @@ -30,23 +30,23 @@ import { bytesToHexString, } from "@farcaster/hub-web"; import { Cog6ToothIcon } from "@heroicons/react/20/solid"; -import { config } from "@/common/helpers/rainbowkit"; +import { config } from "@/space/common/helpers/rainbowkit"; import { getDeadline, getUsernameForFid, isValidSignedKeyRequest, -} from "@/common/helpers/farcaster"; +} from "@/space/common/helpers/farcaster"; import { writeContract } from "@wagmi/core"; -import { generateKeyPair } from "@/common/helpers/warpcastLogin"; +import { generateKeyPair } from "@/space/common/helpers/warpcastLogin"; import { AccountPlatformType, AccountStatusType, -} from "@/common/constants/accounts"; -import { useAccountStore } from "@/stores/useAccountStore"; -import { JoinedHerocastViaHatsProtocolDraft, useNewPostStore } from "@/stores/useNewPostStore"; +} from "@/space/common/constants/accounts"; +import { useAccountStore } from "@/space/stores/useAccountStore"; +import { JoinedHerocastViaHatsProtocolDraft, useNewPostStore } from "@/space/stores/useNewPostStore"; import { useRouter } from "next/router"; import { NeynarAPIClient } from "@neynar/nodejs-sdk"; -import { isValidSignature, isValidSigner } from "@/lib/hats"; -import { SIGNED_KEY_REQUEST_TYPEHASH } from "@/lib/hats"; -import SwitchWalletButton from "@/common/components/SwitchWalletButton"; +import { isValidSignature, isValidSigner } from "@/space/lib/hats"; +import { SIGNED_KEY_REQUEST_TYPEHASH } from "@/space/lib/hats"; +import SwitchWalletButton from "@/space/common/components/SwitchWalletButton"; enum SignupStateEnum { "CONNECT_WALLET", diff --git a/src/common/components/CreateFarcasterAccount.tsx b/src/space/common/components/CreateFarcasterAccount.tsx similarity index 98% rename from src/common/components/CreateFarcasterAccount.tsx rename to src/space/common/components/CreateFarcasterAccount.tsx index 29ed4a7c..c525e1f3 100644 --- a/src/common/components/CreateFarcasterAccount.tsx +++ b/src/space/common/components/CreateFarcasterAccount.tsx @@ -1,5 +1,5 @@ import React, { useEffect, useState } from "react"; -import { Button } from "@/components/ui/button"; +import { Button } from "@/shared/ui/button"; import { useAccount, useReadContract, @@ -12,7 +12,7 @@ import { bundlerABI, bytesToHexString, } from "@farcaster/hub-web"; -import { config } from "@/common/helpers/rainbowkit"; +import { config } from "@/space/common/helpers/rainbowkit"; import { WARPCAST_RECOVERY_PROXY, getDeadline, @@ -24,7 +24,7 @@ import { formatEther, toBytes, toHex } from "viem"; import { PENDING_ACCOUNT_NAME_PLACEHOLDER, useAccountStore, -} from "@/stores/useAccountStore"; +} from "@/space/stores/useAccountStore"; import { AccountPlatformType, AccountStatusType } from "../constants/accounts"; import { generateKeyPair } from "../helpers/warpcastLogin"; import { writeContract } from "@wagmi/core"; diff --git a/src/common/components/DeployHatsDelegatorContract.tsx b/src/space/common/components/DeployHatsDelegatorContract.tsx similarity index 96% rename from src/common/components/DeployHatsDelegatorContract.tsx rename to src/space/common/components/DeployHatsDelegatorContract.tsx index 48d086ea..e28d03d7 100644 --- a/src/common/components/DeployHatsDelegatorContract.tsx +++ b/src/space/common/components/DeployHatsDelegatorContract.tsx @@ -6,14 +6,14 @@ import { CardFooter, CardHeader, CardTitle, -} from "@/components/ui/card"; -import { Button } from "@/components/ui/button"; +} from "@/shared/ui/card"; +import { Button } from "@/shared/ui/button"; import { useAccount, useSignTypedData, useWalletClient } from "wagmi"; -import { Input } from "@/components/ui/input"; +import { Input } from "@/shared/ui/input"; import { ID_GATEWAY_ADDRESS, KEY_GATEWAY_ADDRESS, KEY_REGISTRY_ADDRESS, SIGNED_KEY_REQUEST_VALIDATOR_ADDRESS, idRegistryABI } from "@farcaster/hub-web"; import { Cog6ToothIcon } from "@heroicons/react/20/solid"; import { ID_REGISTRY_ADDRESS } from "@farcaster/hub-web"; -import { publicClient } from "@/common/helpers/rainbowkit"; +import { publicClient } from "@/space/common/helpers/rainbowkit"; import { useWaitForTransactionReceipt } from "wagmi"; import { z } from "zod"; import { Address, getAddress, hexToBigInt, parseEventLogs, toHex, zeroAddress } from "viem"; @@ -27,7 +27,7 @@ import { FormItem, FormLabel, FormMessage, -} from "@/components/ui/form"; +} from "@/shared/ui/form"; import { HatsModulesClient, Registry, @@ -35,8 +35,8 @@ import { } from "@hatsprotocol/modules-sdk"; import { optimism } from "wagmi/chains"; import { getCustomRegistry } from "../../lib/hats"; -import { openWindow } from "@/common/helpers/navigation"; -import { HatsModuleFactoryAbi } from "@/common/constants/contracts/HatsModuleFactory"; +import { openWindow } from "@/space/common/helpers/navigation"; +import { HatsModuleFactoryAbi } from "@/space/common/constants/contracts/HatsModuleFactory"; import { AddressSchema } from "@hatsprotocol/modules-sdk/dist/schemas"; const HATS_FARCASTER_DELEGATOR_CONTRACT_ADDRESS: `0x${string}` = '0xa947334c33dadca4bcbb396395ecfd66601bb38c'; diff --git a/src/common/components/Embeds/CastEmbed.tsx b/src/space/common/components/Embeds/CastEmbed.tsx similarity index 100% rename from src/common/components/Embeds/CastEmbed.tsx rename to src/space/common/components/Embeds/CastEmbed.tsx diff --git a/src/common/components/Embeds/FrameEmbed.tsx b/src/space/common/components/Embeds/FrameEmbed.tsx similarity index 97% rename from src/common/components/Embeds/FrameEmbed.tsx rename to src/space/common/components/Embeds/FrameEmbed.tsx index 9759969d..9fddc4b2 100644 --- a/src/common/components/Embeds/FrameEmbed.tsx +++ b/src/space/common/components/Embeds/FrameEmbed.tsx @@ -1,8 +1,8 @@ import React, { useEffect, useState } from "react"; import { CastWithInteractions } from "@neynar/nodejs-sdk/build/neynar-api/v1"; -import { Button } from "@/components/ui/button"; +import { Button } from "@/shared/ui/button"; import { useHotkeys } from "react-hotkeys-hook"; -import { openWindow } from "@/common/helpers/navigation"; +import { openWindow } from "@/space/common/helpers/navigation"; const renderFrame = ( frame: any, diff --git a/src/common/components/Embeds/NounsBuildEmbed.tsx b/src/space/common/components/Embeds/NounsBuildEmbed.tsx similarity index 98% rename from src/common/components/Embeds/NounsBuildEmbed.tsx rename to src/space/common/components/Embeds/NounsBuildEmbed.tsx index fc4734fd..ada9e844 100644 --- a/src/common/components/Embeds/NounsBuildEmbed.tsx +++ b/src/space/common/components/Embeds/NounsBuildEmbed.tsx @@ -1,6 +1,6 @@ import React, { useEffect, useState } from "react"; -import { classNames } from "@/common/helpers/css"; -import { makeGraphqlRequest } from "@/common/helpers/graphql"; +import { classNames } from "@/space/common/helpers/css"; +import { makeGraphqlRequest } from "@/space/common/helpers/graphql"; import { ArrowTopRightOnSquareIcon } from "@heroicons/react/24/outline"; import { get, isEmpty } from "lodash"; import { openWindow } from "../../helpers/navigation"; diff --git a/src/common/components/Embeds/OnchainEmbed.tsx b/src/space/common/components/Embeds/OnchainEmbed.tsx similarity index 100% rename from src/common/components/Embeds/OnchainEmbed.tsx rename to src/space/common/components/Embeds/OnchainEmbed.tsx diff --git a/src/common/components/Embeds/OpenGraphImage.tsx b/src/space/common/components/Embeds/OpenGraphImage.tsx similarity index 90% rename from src/common/components/Embeds/OpenGraphImage.tsx rename to src/space/common/components/Embeds/OpenGraphImage.tsx index b71eeb43..6fc9f298 100644 --- a/src/common/components/Embeds/OpenGraphImage.tsx +++ b/src/space/common/components/Embeds/OpenGraphImage.tsx @@ -1,5 +1,5 @@ import React, { useEffect, useState } from "react"; -import { AspectRatio } from "@/components/ui/aspect-ratio"; +import { AspectRatio } from "@/shared/ui/aspect-ratio"; import { Card, CardContent, @@ -7,8 +7,8 @@ import { CardFooter, CardHeader, CardTitle, -} from "@/components/ui/card"; -import { openWindow } from "@/common/helpers/navigation"; +} from "@/shared/ui/card"; +import { openWindow } from "@/space/common/helpers/navigation"; type OpenGraphMetadata = { image: { diff --git a/src/common/components/Embeds/ParagraphXyzEmbed.tsx b/src/space/common/components/Embeds/ParagraphXyzEmbed.tsx similarity index 95% rename from src/common/components/Embeds/ParagraphXyzEmbed.tsx rename to src/space/common/components/Embeds/ParagraphXyzEmbed.tsx index f9992d40..ec962792 100644 --- a/src/common/components/Embeds/ParagraphXyzEmbed.tsx +++ b/src/space/common/components/Embeds/ParagraphXyzEmbed.tsx @@ -10,9 +10,9 @@ import { CardFooter, CardHeader, CardTitle, -} from "@/components/ui/card"; -import { openWindow } from "@/common/helpers/navigation"; -import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; +} from "@/shared/ui/card"; +import { openWindow } from "@/space/common/helpers/navigation"; +import { Avatar, AvatarFallback, AvatarImage } from "@/shared/ui/avatar"; type ParagraphXyzEmbedProps = { url: string; }; diff --git a/src/common/components/Embeds/TweetEmbed.tsx b/src/space/common/components/Embeds/TweetEmbed.tsx similarity index 100% rename from src/common/components/Embeds/TweetEmbed.tsx rename to src/space/common/components/Embeds/TweetEmbed.tsx diff --git a/src/common/components/Embeds/VideoEmbed.tsx b/src/space/common/components/Embeds/VideoEmbed.tsx similarity index 100% rename from src/common/components/Embeds/VideoEmbed.tsx rename to src/space/common/components/Embeds/VideoEmbed.tsx diff --git a/src/common/components/Embeds/index.tsx b/src/space/common/components/Embeds/index.tsx similarity index 96% rename from src/common/components/Embeds/index.tsx rename to src/space/common/components/Embeds/index.tsx index 72532d8c..152af42d 100644 --- a/src/common/components/Embeds/index.tsx +++ b/src/space/common/components/Embeds/index.tsx @@ -5,7 +5,7 @@ import TweetEmbed from "./TweetEmbed"; import NounsBuildEmbed from "./NounsBuildEmbed"; import ParagraphXyzEmbed from "./ParagraphXyzEmbed"; import OpenGraphImage from "./OpenGraphImage"; -import { isImageUrl } from "@/common/helpers/text"; +import { isImageUrl } from "@/space/common/helpers/text"; import VideoEmbed from "./VideoEmbed"; import { ImgurImage } from "../PostEmbeddedContent"; diff --git a/src/common/components/EmbedsModal.tsx b/src/space/common/components/EmbedsModal.tsx similarity index 100% rename from src/common/components/EmbedsModal.tsx rename to src/space/common/components/EmbedsModal.tsx diff --git a/src/common/components/EmptyStateWithAction.tsx b/src/space/common/components/EmptyStateWithAction.tsx similarity index 94% rename from src/common/components/EmptyStateWithAction.tsx rename to src/space/common/components/EmptyStateWithAction.tsx index c638091c..6006e9be 100644 --- a/src/common/components/EmptyStateWithAction.tsx +++ b/src/space/common/components/EmptyStateWithAction.tsx @@ -1,4 +1,4 @@ -import { Button } from "@/components/ui/button"; +import { Button } from "@/shared/ui/button"; import React from "react"; type EmptyStateWithActionProps = { diff --git a/src/common/components/FarcasterLogo.tsx b/src/space/common/components/FarcasterLogo.tsx similarity index 100% rename from src/common/components/FarcasterLogo.tsx rename to src/space/common/components/FarcasterLogo.tsx diff --git a/src/common/components/FollowButton.tsx b/src/space/common/components/FollowButton.tsx similarity index 92% rename from src/common/components/FollowButton.tsx rename to src/space/common/components/FollowButton.tsx index 7d853402..cc1e49fb 100644 --- a/src/common/components/FollowButton.tsx +++ b/src/space/common/components/FollowButton.tsx @@ -1,11 +1,11 @@ import React, { useEffect, useState } from "react"; -import { Button } from "@/components/ui/button"; +import { Button } from "@/shared/ui/button"; import clsx from "clsx"; import { followUser, unfollowUser } from "../helpers/farcaster"; -import { useAccountStore } from "@/stores/useAccountStore"; +import { useAccountStore } from "@/space/stores/useAccountStore"; import { useRouter } from "next/navigation"; -import { useDataStore } from "@/stores/useDataStore"; +import { useDataStore } from "@/space/stores/useDataStore"; import { get } from "lodash"; type FollowButtonProps = { diff --git a/src/common/components/HelpCard.tsx b/src/space/common/components/HelpCard.tsx similarity index 89% rename from src/common/components/HelpCard.tsx rename to src/space/common/components/HelpCard.tsx index e50ab560..102fd389 100644 --- a/src/common/components/HelpCard.tsx +++ b/src/space/common/components/HelpCard.tsx @@ -6,10 +6,10 @@ import { CardDescription, CardHeader, CardTitle, -} from "@/components/ui/card"; +} from "@/shared/ui/card"; import { ChatBubbleLeftEllipsisIcon } from "@heroicons/react/24/outline"; -import { openWindow } from "@/common/helpers/navigation"; -import { Button } from '@/components/ui/button'; +import { openWindow } from "@/space/common/helpers/navigation"; +import { Button } from '@/shared/ui/button'; const HelpCard = () => ( diff --git a/src/common/components/HotkeyTooltipWrapper.tsx b/src/space/common/components/HotkeyTooltipWrapper.tsx similarity index 96% rename from src/common/components/HotkeyTooltipWrapper.tsx rename to src/space/common/components/HotkeyTooltipWrapper.tsx index a5720d2d..5279e8da 100644 --- a/src/common/components/HotkeyTooltipWrapper.tsx +++ b/src/space/common/components/HotkeyTooltipWrapper.tsx @@ -4,7 +4,7 @@ import { Tooltip, TooltipTrigger, TooltipContent, -} from "@/components/ui/tooltip"; +} from "@/shared/ui/tooltip"; import { TooltipArrow } from "@radix-ui/react-tooltip"; type HotkeyTooltipWrapperProps = { diff --git a/src/common/components/Loading.tsx b/src/space/common/components/Loading.tsx similarity index 100% rename from src/common/components/Loading.tsx rename to src/space/common/components/Loading.tsx diff --git a/src/common/components/Modal.tsx b/src/space/common/components/Modal.tsx similarity index 100% rename from src/common/components/Modal.tsx rename to src/space/common/components/Modal.tsx diff --git a/src/common/components/NewPostEntry.tsx b/src/space/common/components/NewPostEntry.tsx similarity index 97% rename from src/common/components/NewPostEntry.tsx rename to src/space/common/components/NewPostEntry.tsx index f37d8b98..5167cf5b 100644 --- a/src/common/components/NewPostEntry.tsx +++ b/src/space/common/components/NewPostEntry.tsx @@ -1,6 +1,6 @@ import React, { useEffect } from "react"; -import { useNewPostStore } from "@/stores/useNewPostStore"; -import { useAccountStore } from "@/stores/useAccountStore"; +import { useNewPostStore } from "@/space/stores/useNewPostStore"; +import { useAccountStore } from "@/space/stores/useAccountStore"; import { DraftType } from "../constants/farcaster"; import { useHotkeys } from "react-hotkeys-hook"; import { useEditor, EditorContent } from "@mod-protocol/react-editor"; @@ -18,7 +18,7 @@ import { import { createRenderMentionsSuggestionConfig } from "@mod-protocol/react-ui-shadcn/dist/lib/mentions"; import { CastLengthUIIndicator } from "@mod-protocol/react-ui-shadcn/dist/components/cast-length-ui-indicator"; import { debounce, map } from "lodash"; -import { Button } from "@/components/ui/button"; +import { Button } from "@/shared/ui/button"; import { MentionList } from "@mod-protocol/react-ui-shadcn/dist/components/mention-list"; import { take } from "lodash"; import { ChannelPicker } from "./ChannelPicker"; @@ -26,7 +26,7 @@ import { Popover, PopoverContent, PopoverTrigger, -} from "@/components/ui/popover"; +} from "@/shared/ui/popover"; import { CreationMod } from "@mod-protocol/react"; import { creationMods } from "@mod-protocol/mod-registry"; import { renderers } from "@mod-protocol/react-ui-shadcn/dist/renderers"; diff --git a/src/common/components/PostEmbeddedContent/ImgurImage.tsx b/src/space/common/components/PostEmbeddedContent/ImgurImage.tsx similarity index 100% rename from src/common/components/PostEmbeddedContent/ImgurImage.tsx rename to src/space/common/components/PostEmbeddedContent/ImgurImage.tsx diff --git a/src/common/components/PostEmbeddedContent/index.tsx b/src/space/common/components/PostEmbeddedContent/index.tsx similarity index 100% rename from src/common/components/PostEmbeddedContent/index.tsx rename to src/space/common/components/PostEmbeddedContent/index.tsx diff --git a/src/common/components/ProfileHoverCard.tsx b/src/space/common/components/ProfileHoverCard.tsx similarity index 94% rename from src/common/components/ProfileHoverCard.tsx rename to src/space/common/components/ProfileHoverCard.tsx index ea49213d..121364a8 100644 --- a/src/common/components/ProfileHoverCard.tsx +++ b/src/space/common/components/ProfileHoverCard.tsx @@ -3,12 +3,12 @@ import { HoverCard, HoverCardContent, HoverCardTrigger, -} from "@/components/ui/hover-card"; -import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; +} from "@/shared/ui/hover-card"; +import { Avatar, AvatarFallback, AvatarImage } from "@/shared/ui/avatar"; import { openWindow } from "../helpers/navigation"; import { Loading } from "./Loading"; import { useInView } from "react-intersection-observer"; -import { useDataStore } from "@/stores/useDataStore"; +import { useDataStore } from "@/space/stores/useDataStore"; import { get } from "lodash"; import FollowButton from "./FollowButton"; import { NeynarAPIClient } from "@neynar/nodejs-sdk"; diff --git a/src/common/components/QrCode.tsx b/src/space/common/components/QrCode.tsx similarity index 88% rename from src/common/components/QrCode.tsx rename to src/space/common/components/QrCode.tsx index 0ddb8a53..bd17095c 100644 --- a/src/common/components/QrCode.tsx +++ b/src/space/common/components/QrCode.tsx @@ -1,6 +1,6 @@ import React from "react"; import QRCode from "react-qr-code"; -import { openWindow } from "@/common/helpers/navigation"; +import { openWindow } from "@/space/common/helpers/navigation"; export const QrCode = ({ deepLink }: { deepLink: string }) => { return
diff --git a/src/common/components/RecommendedProfilesCard.tsx b/src/space/common/components/RecommendedProfilesCard.tsx similarity index 97% rename from src/common/components/RecommendedProfilesCard.tsx rename to src/space/common/components/RecommendedProfilesCard.tsx index 0479bf45..ae42d5f1 100644 --- a/src/common/components/RecommendedProfilesCard.tsx +++ b/src/space/common/components/RecommendedProfilesCard.tsx @@ -2,7 +2,7 @@ import React, { useEffect, useState } from "react"; import { NeynarAPIClient } from "@neynar/nodejs-sdk"; import { User } from "@neynar/nodejs-sdk/build/neynar-api/v2"; import FollowButton from "./FollowButton"; -import { useDataStore } from "@/stores/useDataStore"; +import { useDataStore } from "@/space/stores/useDataStore"; const defaultProfiles: User[] = [ { diff --git a/src/common/components/RegisterFarcasterUsernameForm.tsx b/src/space/common/components/RegisterFarcasterUsernameForm.tsx similarity index 98% rename from src/common/components/RegisterFarcasterUsernameForm.tsx rename to src/space/common/components/RegisterFarcasterUsernameForm.tsx index e56723a4..3dd0ce81 100644 --- a/src/common/components/RegisterFarcasterUsernameForm.tsx +++ b/src/space/common/components/RegisterFarcasterUsernameForm.tsx @@ -10,9 +10,9 @@ import { FormItem, FormLabel, FormMessage, -} from "@/components/ui/form"; -import { Button } from "@/components/ui/button"; -import { Input } from "@/components/ui/input"; +} from "@/shared/ui/form"; +import { Button } from "@/shared/ui/button"; +import { Input } from "@/shared/ui/input"; import { useAccount, useSignTypedData, useWalletClient } from "wagmi"; import { getFidForAddress, @@ -26,7 +26,7 @@ import { getAddress, toHex } from "viem"; import { PENDING_ACCOUNT_NAME_PLACEHOLDER, useAccountStore, -} from "@/stores/useAccountStore"; +} from "@/space/stores/useAccountStore"; import { AccountPlatformType, AccountStatusType } from "../constants/accounts"; import { mainnet } from "viem/chains"; import { UserDataType } from "@farcaster/hub-web"; diff --git a/src/common/components/ReplyModal.tsx b/src/space/common/components/ReplyModal.tsx similarity index 94% rename from src/common/components/ReplyModal.tsx rename to src/space/common/components/ReplyModal.tsx index 9aa05f4c..058227c5 100644 --- a/src/common/components/ReplyModal.tsx +++ b/src/space/common/components/ReplyModal.tsx @@ -1,10 +1,10 @@ import React, { useEffect } from 'react'; import Modal from './Modal'; import NewPostEntry from './NewPostEntry'; -import { useNewPostStore } from '@/stores/useNewPostStore'; +import { useNewPostStore } from '@/space/stores/useNewPostStore'; import { CastRow } from './CastRow'; import { useHotkeys } from 'react-hotkeys-hook'; -import { useAccountStore } from '@/stores/useAccountStore'; +import { useAccountStore } from '@/space/stores/useAccountStore'; type CastToReplyType = { hash: string; diff --git a/src/common/components/RightSidebar/AccountsRightSidebar.tsx b/src/space/common/components/RightSidebar/AccountsRightSidebar.tsx similarity index 95% rename from src/common/components/RightSidebar/AccountsRightSidebar.tsx rename to src/space/common/components/RightSidebar/AccountsRightSidebar.tsx index ab7d4ff7..ca5c083c 100644 --- a/src/common/components/RightSidebar/AccountsRightSidebar.tsx +++ b/src/space/common/components/RightSidebar/AccountsRightSidebar.tsx @@ -3,10 +3,10 @@ import { AccountObjectType, PENDING_ACCOUNT_NAME_PLACEHOLDER, useAccountStore, -} from "@/stores/useAccountStore"; +} from "@/space/stores/useAccountStore"; import { ArrowDownTrayIcon, UserPlusIcon } from "@heroicons/react/24/outline"; -import EmptyStateWithAction from "@/common/components/EmptyStateWithAction"; -import { classNames } from "@/common/helpers/css"; +import EmptyStateWithAction from "@/space/common/components/EmptyStateWithAction"; +import { classNames } from "@/space/common/helpers/css"; import { isEmpty } from "lodash"; import ChannelsOverview from "./ChannelsOverview"; import { SidebarHeader } from "./SidebarHeader"; @@ -16,7 +16,7 @@ import { useRouter } from "next/router"; import { AccountPlatformType, AccountStatusType, -} from "@/common/constants/accounts"; +} from "@/space/common/constants/accounts"; type AccountsRightSidebarProps = { showChannels?: boolean; diff --git a/src/common/components/RightSidebar/ChannelsOverview.tsx b/src/space/common/components/RightSidebar/ChannelsOverview.tsx similarity index 94% rename from src/common/components/RightSidebar/ChannelsOverview.tsx rename to src/space/common/components/RightSidebar/ChannelsOverview.tsx index ca928b76..1dca6486 100644 --- a/src/common/components/RightSidebar/ChannelsOverview.tsx +++ b/src/space/common/components/RightSidebar/ChannelsOverview.tsx @@ -1,12 +1,12 @@ import React from "react"; -import { ChannelType } from "@/common/constants/channels"; -import { classNames } from "@/common/helpers/css"; -import { CUSTOM_CHANNELS, useAccountStore } from "@/stores/useAccountStore"; +import { ChannelType } from "@/space/common/constants/channels"; +import { classNames } from "@/space/common/helpers/css"; +import { CUSTOM_CHANNELS, useAccountStore } from "@/space/stores/useAccountStore"; import { SidebarHeader } from "./SidebarHeader"; import * as Tooltip from "@radix-ui/react-tooltip"; import { useRouter } from "next/router"; import HotkeyTooltipWrapper from "../HotkeyTooltipWrapper"; -import { Badge } from "@/components/ui/badge"; +import { Badge } from "@/shared/ui/badge"; const ChannelsOverview = () => { const router = useRouter(); diff --git a/src/common/components/RightSidebar/ChannelsRightSidebar.tsx b/src/space/common/components/RightSidebar/ChannelsRightSidebar.tsx similarity index 100% rename from src/common/components/RightSidebar/ChannelsRightSidebar.tsx rename to src/space/common/components/RightSidebar/ChannelsRightSidebar.tsx diff --git a/src/common/components/RightSidebar/EmptyRightSidebar.tsx b/src/space/common/components/RightSidebar/EmptyRightSidebar.tsx similarity index 100% rename from src/common/components/RightSidebar/EmptyRightSidebar.tsx rename to src/space/common/components/RightSidebar/EmptyRightSidebar.tsx diff --git a/src/common/components/RightSidebar/SidebarHeader.tsx b/src/space/common/components/RightSidebar/SidebarHeader.tsx similarity index 100% rename from src/common/components/RightSidebar/SidebarHeader.tsx rename to src/space/common/components/RightSidebar/SidebarHeader.tsx diff --git a/src/common/components/SelectableListWithHotkeys.tsx b/src/space/common/components/SelectableListWithHotkeys.tsx similarity index 100% rename from src/common/components/SelectableListWithHotkeys.tsx rename to src/space/common/components/SelectableListWithHotkeys.tsx diff --git a/src/common/components/SharedAccountOwnershipSetup.tsx b/src/space/common/components/SharedAccountOwnershipSetup.tsx similarity index 96% rename from src/common/components/SharedAccountOwnershipSetup.tsx rename to src/space/common/components/SharedAccountOwnershipSetup.tsx index 1654bbb6..c95cf5ab 100644 --- a/src/common/components/SharedAccountOwnershipSetup.tsx +++ b/src/space/common/components/SharedAccountOwnershipSetup.tsx @@ -1,7 +1,7 @@ import React, { useState } from "react"; -import BigOptionSelector from "@/common/components/BigOptionSelector"; -import { Button } from "@/components/ui/button"; -import { Input } from "@/components/ui/input"; +import BigOptionSelector from "@/space/common/components/BigOptionSelector"; +import { Button } from "@/shared/ui/button"; +import { Input } from "@/shared/ui/input"; import { isAddress } from "viem"; import DeployHatsDelegatorContract from "./DeployHatsDelegatorContract"; import { ImgurImage } from "./PostEmbeddedContent/ImgurImage"; diff --git a/src/common/components/ShowLinkCard.tsx b/src/space/common/components/ShowLinkCard.tsx similarity index 85% rename from src/common/components/ShowLinkCard.tsx rename to src/space/common/components/ShowLinkCard.tsx index a9a9e734..5533decc 100644 --- a/src/common/components/ShowLinkCard.tsx +++ b/src/space/common/components/ShowLinkCard.tsx @@ -6,10 +6,10 @@ import { CardFooter, CardHeader, CardTitle, -} from "@/components/ui/card"; -import { Button } from "@/components/ui/button"; -import { Label } from "@/components/ui/label"; -import { Input } from "@/components/ui/input"; +} from "@/shared/ui/card"; +import { Button } from "@/shared/ui/button"; +import { Label } from "@/shared/ui/label"; +import { Input } from "@/shared/ui/input"; import { openWindow } from "../helpers/navigation"; type ShowLinkCardProps = { diff --git a/src/common/components/Steps/SidebarNav.tsx b/src/space/common/components/Steps/SidebarNav.tsx similarity index 93% rename from src/common/components/Steps/SidebarNav.tsx rename to src/space/common/components/Steps/SidebarNav.tsx index 4a67800e..1639572e 100644 --- a/src/common/components/Steps/SidebarNav.tsx +++ b/src/space/common/components/Steps/SidebarNav.tsx @@ -1,6 +1,6 @@ import React from "react"; -import { Button } from "@/components/ui/button"; -import { classNames } from "@/common/helpers/css"; +import { Button } from "@/shared/ui/button"; +import { classNames } from "@/space/common/helpers/css"; import { CheckCircleIcon } from "@heroicons/react/20/solid"; import { findIndex } from "lodash"; diff --git a/src/common/components/Steps/StepSequence.tsx b/src/space/common/components/Steps/StepSequence.tsx similarity index 93% rename from src/common/components/Steps/StepSequence.tsx rename to src/space/common/components/Steps/StepSequence.tsx index 272d179b..3fab434f 100644 --- a/src/common/components/Steps/StepSequence.tsx +++ b/src/space/common/components/Steps/StepSequence.tsx @@ -1,6 +1,6 @@ import React, { ReactNode } from "react"; -import { Progress } from "@/components/ui/progress"; -import { Separator } from "@/components/ui/separator"; +import { Progress } from "@/shared/ui/progress"; +import { Separator } from "@/shared/ui/separator"; import { SidebarNav } from "./SidebarNav"; import { findIndex } from "lodash"; diff --git a/src/common/components/SwitchWalletButton.tsx b/src/space/common/components/SwitchWalletButton.tsx similarity index 89% rename from src/common/components/SwitchWalletButton.tsx rename to src/space/common/components/SwitchWalletButton.tsx index 7173df70..bb547c4c 100644 --- a/src/common/components/SwitchWalletButton.tsx +++ b/src/space/common/components/SwitchWalletButton.tsx @@ -1,7 +1,7 @@ import React, { useEffect } from "react"; -import { Button } from "@/components/ui/button"; -import { Label } from "@/components/ui/label"; +import { Button } from "@/shared/ui/button"; +import { Label } from "@/shared/ui/label"; import { useAccountModal, useConnectModal } from "@rainbow-me/rainbowkit"; import { useAccount } from "wagmi"; diff --git a/src/common/components/ThemeToggle.tsx b/src/space/common/components/ThemeToggle.tsx similarity index 93% rename from src/common/components/ThemeToggle.tsx rename to src/space/common/components/ThemeToggle.tsx index b7e8497c..d175f3bf 100644 --- a/src/common/components/ThemeToggle.tsx +++ b/src/space/common/components/ThemeToggle.tsx @@ -2,13 +2,13 @@ import * as React from "react" import { MoonIcon, SunIcon } from "@radix-ui/react-icons" import { useTheme } from "next-themes" -import { Button } from "@/components/ui/button" +import { Button } from "@/shared/ui/button" import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, -} from "@/components/ui/dropdown-menu" +} from "@/shared/ui/dropdown-menu" export function ThemeToggle() { const { setTheme } = useTheme() diff --git a/src/common/components/Toggle.tsx b/src/space/common/components/Toggle.tsx similarity index 100% rename from src/common/components/Toggle.tsx rename to src/space/common/components/Toggle.tsx diff --git a/src/common/components/TransferAccountToHatsDelegator.tsx b/src/space/common/components/TransferAccountToHatsDelegator.tsx similarity index 97% rename from src/common/components/TransferAccountToHatsDelegator.tsx rename to src/space/common/components/TransferAccountToHatsDelegator.tsx index b4024207..cefedf6d 100644 --- a/src/common/components/TransferAccountToHatsDelegator.tsx +++ b/src/space/common/components/TransferAccountToHatsDelegator.tsx @@ -1,5 +1,5 @@ import React, { useEffect, useState } from "react"; -import { Button } from "@/components/ui/button"; +import { Button } from "@/shared/ui/button"; import { useAccount, useReadContract, useSignTypedData } from "wagmi"; import { ID_REGISTRY_EIP_712_DOMAIN, @@ -9,22 +9,22 @@ import { import { Cog6ToothIcon } from "@heroicons/react/20/solid"; import { ID_REGISTRY_ADDRESS } from "@farcaster/hub-web"; import { writeContract } from "@wagmi/core"; -import { config, publicClient } from "@/common/helpers/rainbowkit"; +import { config, publicClient } from "@/space/common/helpers/rainbowkit"; import { encodePacked, hashTypedData, keccak256, toHex } from "viem"; import { useWaitForTransactionReceipt } from "wagmi"; -import { getDeadline } from "@/common/helpers/farcaster"; -import { HatsFarcasterDelegatorAbi } from "@/common/constants/contracts/HatsFarcasterDelegator"; +import { getDeadline } from "@/space/common/helpers/farcaster"; +import { HatsFarcasterDelegatorAbi } from "@/space/common/constants/contracts/HatsFarcasterDelegator"; import { openWindow } from "../helpers/navigation"; import { SIGNED_KEY_REQUEST_TYPEHASH, isValidSignature, isValidSigner, -} from "@/lib/hats"; +} from "@/space/lib/hats"; import { waitForTransactionReceipt } from "@wagmi/core"; import { useAccountModal, useConnectModal } from "@rainbow-me/rainbowkit"; import SwitchWalletButton from "./SwitchWalletButton"; import { ID_REGISTRY } from "../constants/contracts/id-registry"; -import { Label } from "@/components/ui/label"; +import { Label } from "@/shared/ui/label"; import { User } from "@neynar/nodejs-sdk/build/neynar-api/v2"; const readNonces = async (account: `0x${string}`) => { diff --git a/src/common/components/UserAuthForm.tsx b/src/space/common/components/UserAuthForm.tsx similarity index 97% rename from src/common/components/UserAuthForm.tsx rename to src/space/common/components/UserAuthForm.tsx index 26151fb5..726578c2 100644 --- a/src/common/components/UserAuthForm.tsx +++ b/src/space/common/components/UserAuthForm.tsx @@ -1,9 +1,9 @@ import * as React from "react"; -import { cn } from "@/lib/utils"; -import { Button } from "@/components/ui/button"; -import { Input } from "@/components/ui/input"; -import { Label } from "@/components/ui/label"; +import { cn } from "@/space/lib/utils"; +import { Button } from "@/shared/ui/button"; +import { Input } from "@/shared/ui/input"; +import { Label } from "@/shared/ui/label"; import { Loading } from "./Loading"; import { SignInButton, useProfile } from "@farcaster/auth-kit"; import { useEffect, useState } from "react"; @@ -19,12 +19,12 @@ import { FormField, FormItem, FormMessage, -} from "@/components/ui/form"; +} from "@/shared/ui/form"; import { hydrate, hydrateChannels, useAccountStore, -} from "@/stores/useAccountStore"; +} from "@/space/stores/useAccountStore"; import { NeynarAPIClient } from "@neynar/nodejs-sdk"; import { AccountPlatformType, AccountStatusType } from "../constants/accounts"; import { v4 as uuidv4 } from "uuid"; diff --git a/src/common/components/WalletLogin.tsx b/src/space/common/components/WalletLogin.tsx similarity index 100% rename from src/common/components/WalletLogin.tsx rename to src/space/common/components/WalletLogin.tsx diff --git a/src/common/components/WarpcastLogin.tsx b/src/space/common/components/WarpcastLogin.tsx similarity index 98% rename from src/common/components/WarpcastLogin.tsx rename to src/space/common/components/WarpcastLogin.tsx index ffb0f1b1..b58c2604 100644 --- a/src/common/components/WarpcastLogin.tsx +++ b/src/space/common/components/WarpcastLogin.tsx @@ -5,8 +5,8 @@ import { createSignerRequest, generateWarpcastSigner, getWarpcastSignerStatus, -} from "@/common/helpers/warpcastLogin"; -import { hydrate, useAccountStore } from "@/stores/useAccountStore"; +} from "@/space/common/helpers/warpcastLogin"; +import { hydrate, useAccountStore } from "@/space/stores/useAccountStore"; import { isEmpty } from "lodash"; import { AccountPlatformType, AccountStatusType } from "../constants/accounts"; import { diff --git a/src/common/constants/accounts.ts b/src/space/common/constants/accounts.ts similarity index 100% rename from src/common/constants/accounts.ts rename to src/space/common/constants/accounts.ts diff --git a/src/common/constants/channels.ts b/src/space/common/constants/channels.ts similarity index 100% rename from src/common/constants/channels.ts rename to src/space/common/constants/channels.ts diff --git a/src/common/constants/commands.ts b/src/space/common/constants/commands.ts similarity index 100% rename from src/common/constants/commands.ts rename to src/space/common/constants/commands.ts diff --git a/src/common/constants/contracts/HatsFarcasterDelegator.ts b/src/space/common/constants/contracts/HatsFarcasterDelegator.ts similarity index 100% rename from src/common/constants/contracts/HatsFarcasterDelegator.ts rename to src/space/common/constants/contracts/HatsFarcasterDelegator.ts diff --git a/src/common/constants/contracts/HatsModuleFactory.ts b/src/space/common/constants/contracts/HatsModuleFactory.ts similarity index 100% rename from src/common/constants/contracts/HatsModuleFactory.ts rename to src/space/common/constants/contracts/HatsModuleFactory.ts diff --git a/src/common/constants/contracts/id-registry.ts b/src/space/common/constants/contracts/id-registry.ts similarity index 100% rename from src/common/constants/contracts/id-registry.ts rename to src/space/common/constants/contracts/id-registry.ts diff --git a/src/common/constants/contracts/key-gateway.ts b/src/space/common/constants/contracts/key-gateway.ts similarity index 100% rename from src/common/constants/contracts/key-gateway.ts rename to src/space/common/constants/contracts/key-gateway.ts diff --git a/src/common/constants/contracts/key-registry.ts b/src/space/common/constants/contracts/key-registry.ts similarity index 100% rename from src/common/constants/contracts/key-registry.ts rename to src/space/common/constants/contracts/key-registry.ts diff --git a/src/common/constants/farcaster.ts b/src/space/common/constants/farcaster.ts similarity index 100% rename from src/common/constants/farcaster.ts rename to src/space/common/constants/farcaster.ts diff --git a/src/common/constants/navigation.ts b/src/space/common/constants/navigation.ts similarity index 100% rename from src/common/constants/navigation.ts rename to src/space/common/constants/navigation.ts diff --git a/src/common/constants/tauri.ts b/src/space/common/constants/tauri.ts similarity index 84% rename from src/common/constants/tauri.ts rename to src/space/common/constants/tauri.ts index 70a3ce12..dcd77383 100644 --- a/src/common/constants/tauri.ts +++ b/src/space/common/constants/tauri.ts @@ -1,4 +1,4 @@ -import packageJson from '../../../package.json'; +import packageJson from '../../../../package.json'; // import { getTauriVersion } from '@tauri-apps/api/app'; export const SAVE_DELAY = 500; diff --git a/src/common/helpers/css.ts b/src/space/common/helpers/css.ts similarity index 100% rename from src/common/helpers/css.ts rename to src/space/common/helpers/css.ts diff --git a/src/common/helpers/date.ts b/src/space/common/helpers/date.ts similarity index 100% rename from src/common/helpers/date.ts rename to src/space/common/helpers/date.ts diff --git a/src/common/helpers/farcaster.ts b/src/space/common/helpers/farcaster.ts similarity index 100% rename from src/common/helpers/farcaster.ts rename to src/space/common/helpers/farcaster.ts diff --git a/src/common/helpers/graphql.ts b/src/space/common/helpers/graphql.ts similarity index 100% rename from src/common/helpers/graphql.ts rename to src/space/common/helpers/graphql.ts diff --git a/src/common/helpers/hooks.ts b/src/space/common/helpers/hooks.ts similarity index 100% rename from src/common/helpers/hooks.ts rename to src/space/common/helpers/hooks.ts diff --git a/src/common/helpers/linkify.ts b/src/space/common/helpers/linkify.ts similarity index 100% rename from src/common/helpers/linkify.ts rename to src/space/common/helpers/linkify.ts diff --git a/src/common/helpers/math.ts b/src/space/common/helpers/math.ts similarity index 100% rename from src/common/helpers/math.ts rename to src/space/common/helpers/math.ts diff --git a/src/common/helpers/navigation.ts b/src/space/common/helpers/navigation.ts similarity index 85% rename from src/common/helpers/navigation.ts rename to src/space/common/helpers/navigation.ts index 519cde2d..787854cb 100644 --- a/src/common/helpers/navigation.ts +++ b/src/space/common/helpers/navigation.ts @@ -1,4 +1,4 @@ -import { RUNNING_IN_TAURI } from "@/common/constants/tauri" +import { RUNNING_IN_TAURI } from "@/space/common/constants/tauri" import { open } from '@tauri-apps/api/shell'; export const openWindow = (url: string) => { diff --git a/src/common/helpers/neynar.ts b/src/space/common/helpers/neynar.ts similarity index 100% rename from src/common/helpers/neynar.ts rename to src/space/common/helpers/neynar.ts diff --git a/src/common/helpers/paragraph.ts b/src/space/common/helpers/paragraph.ts similarity index 100% rename from src/common/helpers/paragraph.ts rename to src/space/common/helpers/paragraph.ts diff --git a/src/common/helpers/rainbowkit.tsx b/src/space/common/helpers/rainbowkit.tsx similarity index 100% rename from src/common/helpers/rainbowkit.tsx rename to src/space/common/helpers/rainbowkit.tsx diff --git a/src/common/helpers/searchcaster.ts b/src/space/common/helpers/searchcaster.ts similarity index 100% rename from src/common/helpers/searchcaster.ts rename to src/space/common/helpers/searchcaster.ts diff --git a/src/common/helpers/supabase.ts b/src/space/common/helpers/supabase.ts similarity index 100% rename from src/common/helpers/supabase.ts rename to src/space/common/helpers/supabase.ts diff --git a/src/common/helpers/supabase/api.ts b/src/space/common/helpers/supabase/api.ts similarity index 100% rename from src/common/helpers/supabase/api.ts rename to src/space/common/helpers/supabase/api.ts diff --git a/src/common/helpers/supabase/component.ts b/src/space/common/helpers/supabase/component.ts similarity index 100% rename from src/common/helpers/supabase/component.ts rename to src/space/common/helpers/supabase/component.ts diff --git a/src/common/helpers/supabase/server-props.ts b/src/space/common/helpers/supabase/server-props.ts similarity index 100% rename from src/common/helpers/supabase/server-props.ts rename to src/space/common/helpers/supabase/server-props.ts diff --git a/src/common/helpers/supabase/static-props.ts b/src/space/common/helpers/supabase/static-props.ts similarity index 100% rename from src/common/helpers/supabase/static-props.ts rename to src/space/common/helpers/supabase/static-props.ts diff --git a/src/common/helpers/tauri/contextMenu.ts b/src/space/common/helpers/tauri/contextMenu.ts similarity index 100% rename from src/common/helpers/tauri/contextMenu.ts rename to src/space/common/helpers/tauri/contextMenu.ts diff --git a/src/common/helpers/tauri/storage.ts b/src/space/common/helpers/tauri/storage.ts similarity index 100% rename from src/common/helpers/tauri/storage.ts rename to src/space/common/helpers/tauri/storage.ts diff --git a/src/common/helpers/text.ts b/src/space/common/helpers/text.ts similarity index 100% rename from src/common/helpers/text.ts rename to src/space/common/helpers/text.ts diff --git a/src/common/helpers/toast.ts b/src/space/common/helpers/toast.ts similarity index 100% rename from src/common/helpers/toast.ts rename to src/space/common/helpers/toast.ts diff --git a/src/common/helpers/warpcastLogin.ts b/src/space/common/helpers/warpcastLogin.ts similarity index 100% rename from src/common/helpers/warpcastLogin.ts rename to src/space/common/helpers/warpcastLogin.ts diff --git a/src/common/hooks/ThemeProvider.tsx b/src/space/common/hooks/ThemeProvider.tsx similarity index 100% rename from src/common/hooks/ThemeProvider.tsx rename to src/space/common/hooks/ThemeProvider.tsx diff --git a/src/common/hooks/usePollingUpdate.ts b/src/space/common/hooks/usePollingUpdate.ts similarity index 100% rename from src/common/hooks/usePollingUpdate.ts rename to src/space/common/hooks/usePollingUpdate.ts diff --git a/src/common/hooks/useTauriStore.ts b/src/space/common/hooks/useTauriStore.ts similarity index 100% rename from src/common/hooks/useTauriStore.ts rename to src/space/common/hooks/useTauriStore.ts diff --git a/src/common/types/declaration.d.ts b/src/space/common/types/declaration.d.ts similarity index 100% rename from src/common/types/declaration.d.ts rename to src/space/common/types/declaration.d.ts diff --git a/src/common/types/global.d.ts b/src/space/common/types/global.d.ts similarity index 100% rename from src/common/types/global.d.ts rename to src/space/common/types/global.d.ts diff --git a/src/home/index.tsx b/src/space/home/index.tsx similarity index 87% rename from src/home/index.tsx rename to src/space/home/index.tsx index e38750ea..e2d6fc0d 100644 --- a/src/home/index.tsx +++ b/src/space/home/index.tsx @@ -1,7 +1,7 @@ import React from "react"; import { Fragment, useState } from "react"; import { Dialog, Transition } from "@headlessui/react"; -import { createClient } from "@/common/helpers/supabase/component"; +import { createClient } from "@/space/common/helpers/supabase/component"; import { Cog6ToothIcon, PlusCircleIcon, @@ -11,11 +11,11 @@ import { Bars3Icon, UserPlusIcon, } from "@heroicons/react/20/solid"; -import { classNames } from "@/common/helpers/css"; -import { RIGHT_SIDEBAR_ENUM } from "@/common/constants/navigation"; -import AccountsRightSidebar from "@/common/components/RightSidebar/AccountsRightSidebar"; -import ChannelsRightSidebar from "@/common/components/RightSidebar/ChannelsRightSidebar"; -import { CUSTOM_CHANNELS, useAccountStore } from "@/stores/useAccountStore"; +import { classNames } from "@/space/common/helpers/css"; +import { RIGHT_SIDEBAR_ENUM } from "@/space/common/constants/navigation"; +import AccountsRightSidebar from "@/space/common/components/RightSidebar/AccountsRightSidebar"; +import ChannelsRightSidebar from "@/space/common/components/RightSidebar/ChannelsRightSidebar"; +import { CUSTOM_CHANNELS, useAccountStore } from "@/space/stores/useAccountStore"; import { BellIcon, MagnifyingGlassIcon, @@ -23,13 +23,13 @@ import { RectangleGroupIcon, } from "@heroicons/react/24/solid"; import { useRouter } from "next/router"; -import { ThemeToggle } from "@/common/components/ThemeToggle"; +import { ThemeToggle } from "@/space/common/components/ThemeToggle"; import herocastImg from "@public/images/logo.png"; import { TooltipProvider, -} from "@/components/ui/tooltip"; -import HotkeyTooltipWrapper from "@/common/components/HotkeyTooltipWrapper"; -import { Toaster } from "@/components/ui/sonner"; +} from "@/shared/ui/tooltip"; +import HotkeyTooltipWrapper from "@/space/common/components/HotkeyTooltipWrapper"; +import { Toaster } from "@/shared/ui/sonner"; type NavigationItemType = { name: string; @@ -339,14 +339,14 @@ const Home = ({ children }: { children: React.ReactNode }) => {
*/}
-
-
{children}
-
-
-
-
-
-
+
+
{children}
+
+
+
+
+
+
{/*{renderRightSidebar()}*/}
diff --git a/src/lib/analytics.ts b/src/space/lib/analytics.ts similarity index 100% rename from src/lib/analytics.ts rename to src/space/lib/analytics.ts diff --git a/src/lib/hats.ts b/src/space/lib/hats.ts similarity index 99% rename from src/lib/hats.ts rename to src/space/lib/hats.ts index 22e0d12e..db7339cd 100644 --- a/src/lib/hats.ts +++ b/src/space/lib/hats.ts @@ -1,5 +1,5 @@ -import { HatsFarcasterDelegatorAbi } from "@/common/constants/contracts/HatsFarcasterDelegator"; -import { config } from "@/common/helpers/rainbowkit"; +import { HatsFarcasterDelegatorAbi } from "@/space/common/constants/contracts/HatsFarcasterDelegator"; +import { config } from "@/space/common/helpers/rainbowkit"; import { Registry } from "@hatsprotocol/modules-sdk"; import { readContract } from "@wagmi/core"; diff --git a/src/lib/utils.ts b/src/space/lib/utils.ts similarity index 100% rename from src/lib/utils.ts rename to src/space/lib/utils.ts diff --git a/src/stores/useAccountStore.ts b/src/space/stores/useAccountStore.ts similarity index 97% rename from src/stores/useAccountStore.ts rename to src/space/stores/useAccountStore.ts index 8ca91e65..cde175f1 100644 --- a/src/stores/useAccountStore.ts +++ b/src/space/stores/useAccountStore.ts @@ -1,8 +1,8 @@ -import { AccountPlatformType, AccountStatusType } from "@/common/constants/accounts"; -import { ChannelType } from "@/common/constants/channels"; -import { CommandType } from "@/common/constants/commands"; -import { randomNumberBetween } from "@/common/helpers/math"; -import { getAccountsForUser } from "@/common/helpers/supabase"; +import { AccountPlatformType, AccountStatusType } from "@/space/common/constants/accounts"; +import { ChannelType } from "@/space/common/constants/channels"; +import { CommandType } from "@/space/common/constants/commands"; +import { randomNumberBetween } from "@/space/common/helpers/math"; +import { getAccountsForUser } from "@/space/common/helpers/supabase"; import { Draft, create as mutativeCreate } from 'mutative'; import { create } from "zustand"; import { createJSONStorage, persist } from "zustand/middleware"; @@ -10,9 +10,9 @@ import { isEmpty, findIndex, sortBy, cloneDeep, includes, uniqBy } from "lodash" import { UUID } from "crypto"; import { NeynarAPIClient } from "@neynar/nodejs-sdk"; import { User } from "@neynar/nodejs-sdk/build/neynar-api/v2"; -import { createClient } from "@/common/helpers/supabase/component"; +import { createClient } from "@/space/common/helpers/supabase/component"; import { v4 as uuidv4 } from 'uuid'; -import { getUsernameForFid } from "@/common/helpers/farcaster"; +import { getUsernameForFid } from "@/space/common/helpers/farcaster"; const APP_FID = Number(process.env.NEXT_PUBLIC_APP_FID!); const TIMEDELTA_REHYDRATE = 1000 * 60 * 60 * 12; // 12 hrs; diff --git a/src/stores/useDataStore.ts b/src/space/stores/useDataStore.ts similarity index 100% rename from src/stores/useDataStore.ts rename to src/space/stores/useDataStore.ts diff --git a/src/stores/useNavigationStore.ts b/src/space/stores/useNavigationStore.ts similarity index 100% rename from src/stores/useNavigationStore.ts rename to src/space/stores/useNavigationStore.ts diff --git a/src/stores/useNewPostStore.ts b/src/space/stores/useNewPostStore.ts similarity index 95% rename from src/stores/useNewPostStore.ts rename to src/space/stores/useNewPostStore.ts index 7a82b0c6..3ad88711 100644 --- a/src/stores/useNewPostStore.ts +++ b/src/space/stores/useNewPostStore.ts @@ -1,19 +1,19 @@ import { create } from "zustand"; import { devtools } from "zustand/middleware"; import { create as mutativeCreate, Draft } from 'mutative'; -import { CommandType } from "@/common/constants/commands"; +import { CommandType } from "@/space/common/constants/commands"; import { PlusCircleIcon, TagIcon, TrashIcon } from "@heroicons/react/24/outline"; import { AccountObjectType } from "./useAccountStore"; -import { DraftStatus, DraftType, ParentCastIdType } from "@/common/constants/farcaster"; +import { DraftStatus, DraftType, ParentCastIdType } from "@/space/common/constants/farcaster"; import { getMentionFidsByUsernames, formatPlaintextToHubCastMessage, } from '@mod-protocol/farcaster'; -import { submitCast } from "@/common/helpers/farcaster"; +import { submitCast } from "@/space/common/helpers/farcaster"; import { toHex } from "viem"; import { CastId, Embed } from "@farcaster/hub-web"; -import { AccountPlatformType } from "@/common/constants/accounts"; -import { toastInfoReadOnlyMode } from "@/common/helpers/toast"; +import { AccountPlatformType } from "@/space/common/constants/accounts"; +import { toastInfoReadOnlyMode } from "@/space/common/helpers/toast"; const getMentionFids = getMentionFidsByUsernames(process.env.NEXT_PUBLIC_MOD_PROTOCOL_API_URL!);