Hey is a decentralized and permissionless social media app built with Lens Protocol 🌿

🧹 refactor: Remove FC type annotations from functional components for cleaner code: v6 (#rm-fc)

Summary: Removed `FC` type annotations from functional components for cleaner code.

Highlights:

• `CountdownTimer`, `Cover`, and `CoverUpload` components no longer use `FC` type.
• `DismissRecommendedAccount`, `FallbackAccountName`, and `FeedFocusType` components updated similarly.
• Other components like `Loader`, `LoginButton`, and `MenuTransition` also had `FC` type removed.

Read more: https://pierre.co/yo/hey/rm-fc

authored by yoginth.com and committed by

Pierre dce8348a 341eaf06

+130 -196
+1 -2
apps/web/src/components/Post/Type/Commented.tsx
··· 1 1 import type { PostFragment } from "@hey/indexer"; 2 - import type { FC } from "react"; 3 2 import ThreadBody from "../ThreadBody"; 4 3 5 4 interface CommentedProps { 6 5 commentOn: PostFragment; 7 6 } 8 7 9 - const Commented: FC<CommentedProps> = ({ commentOn }) => { 8 + const Commented = ({ commentOn }: CommentedProps) => { 10 9 return <ThreadBody post={commentOn} />; 11 10 }; 12 11
+1 -2
apps/web/src/components/Post/Type/Reposted.tsx
··· 1 1 import Accounts from "@components/Shared/Accounts"; 2 2 import { ArrowsRightLeftIcon } from "@heroicons/react/24/outline"; 3 3 import type { AccountFragment } from "@hey/indexer"; 4 - import type { FC } from "react"; 5 4 6 5 interface RepostedProps { 7 6 account: AccountFragment; 8 7 } 9 8 10 - const Reposted: FC<RepostedProps> = ({ account }) => { 9 + const Reposted = ({ account }: RepostedProps) => { 11 10 return ( 12 11 <div className="ld-text-gray-500 mb-3 flex items-center space-x-1 text-[13px]"> 13 12 <ArrowsRightLeftIcon className="size-4" />
+1 -6
apps/web/src/components/Post/Type/index.tsx
··· 1 1 import stopEventPropagation from "@hey/helpers/stopEventPropagation"; 2 2 import type { AnyPostFragment } from "@hey/indexer"; 3 3 import { useRouter } from "next/router"; 4 - import type { FC } from "react"; 5 4 import Commented from "./Commented"; 6 5 import Reposted from "./Reposted"; 7 6 ··· 11 10 showType: boolean; 12 11 } 13 12 14 - const PostType: FC<PostTypeProps> = ({ 15 - post, 16 - showThread = false, 17 - showType 18 - }) => { 13 + const PostType = ({ post, showThread = false, showType }: PostTypeProps) => { 19 14 const { pathname } = useRouter(); 20 15 const type = post.__typename; 21 16
+1 -2
apps/web/src/components/Search/Accounts.tsx
··· 3 3 import { UsersIcon } from "@heroicons/react/24/outline"; 4 4 import { type AccountsRequest, PageSize, useAccountsQuery } from "@hey/indexer"; 5 5 import { Card, EmptyState, ErrorMessage } from "@hey/ui"; 6 - import type { FC } from "react"; 7 6 import { Virtuoso } from "react-virtuoso"; 8 7 9 8 interface AccountsProps { 10 9 query: string; 11 10 } 12 11 13 - const Accounts: FC<AccountsProps> = ({ query }) => { 12 + const Accounts = ({ query }: AccountsProps) => { 14 13 const request: AccountsRequest = { 15 14 pageSize: PageSize.Fifty, 16 15 filter: { searchBy: { localNameQuery: query } }
+1 -2
apps/web/src/components/Search/Posts.tsx
··· 3 3 import { ChatBubbleBottomCenterIcon } from "@heroicons/react/24/outline"; 4 4 import { PageSize, type PostsRequest, usePostsQuery } from "@hey/indexer"; 5 5 import { Card, EmptyState, ErrorMessage } from "@hey/ui"; 6 - import type { FC } from "react"; 7 6 import { useRef } from "react"; 8 7 import type { StateSnapshot, VirtuosoHandle } from "react-virtuoso"; 9 8 import { Virtuoso } from "react-virtuoso"; ··· 14 13 query: string; 15 14 } 16 15 17 - const Posts: FC<PostsProps> = ({ query }) => { 16 + const Posts = ({ query }: PostsProps) => { 18 17 const virtuoso = useRef<VirtuosoHandle>(null); 19 18 20 19 const request: PostsRequest = {
+2 -2
apps/web/src/components/Settings/Funds/Unwrap.tsx
··· 4 4 import { Events } from "@hey/data/events"; 5 5 import { useUnwrapTokensMutation } from "@hey/indexer"; 6 6 import { Button, Input, Modal } from "@hey/ui"; 7 - import { type FC, useState } from "react"; 7 + import { useState } from "react"; 8 8 import toast from "react-hot-toast"; 9 9 import usePollTransactionStatus from "src/hooks/usePollTransactionStatus"; 10 10 import useTransactionLifecycle from "src/hooks/useTransactionLifecycle"; ··· 14 14 refetch: () => void; 15 15 } 16 16 17 - const Unwrap: FC<UnwrapProps> = ({ value, refetch }) => { 17 + const Unwrap = ({ value, refetch }: UnwrapProps) => { 18 18 const [isSubmitting, setIsSubmitting] = useState(false); 19 19 const [showModal, setShowModal] = useState(false); 20 20 const [valueToUnwrap, setValueToUnwrap] = useState(value);
+2 -2
apps/web/src/components/Settings/Funds/Withdraw.tsx
··· 3 3 import { Events } from "@hey/data/events"; 4 4 import { useWithdrawMutation } from "@hey/indexer"; 5 5 import { Button, Input, Modal } from "@hey/ui"; 6 - import { type FC, useState } from "react"; 6 + import { useState } from "react"; 7 7 import toast from "react-hot-toast"; 8 8 import usePollTransactionStatus from "src/hooks/usePollTransactionStatus"; 9 9 import useTransactionLifecycle from "src/hooks/useTransactionLifecycle"; ··· 15 15 refetch: () => void; 16 16 } 17 17 18 - const Withdraw: FC<WithdrawProps> = ({ currency, value, refetch }) => { 18 + const Withdraw = ({ currency, value, refetch }: WithdrawProps) => { 19 19 const [isSubmitting, setIsSubmitting] = useState(false); 20 20 const [showModal, setShowModal] = useState(false); 21 21 const [valueToWithdraw, setValueToWithdraw] = useState(value);
+2 -2
apps/web/src/components/Settings/Funds/Wrap.tsx
··· 4 4 import { Events } from "@hey/data/events"; 5 5 import { useWrapTokensMutation } from "@hey/indexer"; 6 6 import { Button, Input, Modal } from "@hey/ui"; 7 - import { type FC, useState } from "react"; 7 + import { useState } from "react"; 8 8 import toast from "react-hot-toast"; 9 9 import usePollTransactionStatus from "src/hooks/usePollTransactionStatus"; 10 10 import useTransactionLifecycle from "src/hooks/useTransactionLifecycle"; ··· 14 14 refetch: () => void; 15 15 } 16 16 17 - const Wrap: FC<WrapProps> = ({ value, refetch }) => { 17 + const Wrap = ({ value, refetch }: WrapProps) => { 18 18 const [isSubmitting, setIsSubmitting] = useState(false); 19 19 const [showModal, setShowModal] = useState(false); 20 20 const [valueToWrap, setValueToWrap] = useState(value);
+3 -3
apps/web/src/components/Settings/Manager/AccountManager/AddAccountManager.tsx
··· 6 6 import { Events } from "@hey/data/events"; 7 7 import { useAddAccountManagerMutation } from "@hey/indexer"; 8 8 import { Button } from "@hey/ui"; 9 - import type { Dispatch, FC, SetStateAction } from "react"; 9 + import type { Dispatch, SetStateAction } from "react"; 10 10 import { useState } from "react"; 11 11 import toast from "react-hot-toast"; 12 12 import useTransactionLifecycle from "src/hooks/useTransactionLifecycle"; ··· 18 18 setShowAddManagerModal: Dispatch<SetStateAction<boolean>>; 19 19 } 20 20 21 - const AddAccountManager: FC<AddAccountManagerProps> = ({ 21 + const AddAccountManager = ({ 22 22 setShowAddManagerModal 23 - }) => { 23 + }: AddAccountManagerProps) => { 24 24 const { currentAccount } = useAccountStore(); 25 25 const { isSuspended } = useAccountStatus(); 26 26 const [manager, setManager] = useState("");
+1 -2
apps/web/src/components/Settings/Manager/AccountManager/Management/List.tsx
··· 11 11 useUnhideManagedAccountMutation 12 12 } from "@hey/indexer"; 13 13 import { Button, EmptyState, ErrorMessage } from "@hey/ui"; 14 - import type { FC } from "react"; 15 14 import { useEffect } from "react"; 16 15 import toast from "react-hot-toast"; 17 16 import { Virtuoso } from "react-virtuoso"; ··· 21 20 managed?: boolean; 22 21 } 23 22 24 - const List: FC<ListProps> = ({ managed = false }) => { 23 + const List = ({ managed = false }: ListProps) => { 25 24 const { address } = useAccount(); 26 25 27 26 const lastLoggedInAccountRequest: LastLoggedInAccountRequest = { address };
+2 -3
apps/web/src/components/Shared/Account/Follow.tsx
··· 9 9 useFollowMutation 10 10 } from "@hey/indexer"; 11 11 import { Button } from "@hey/ui"; 12 - import type { FC } from "react"; 13 12 import { useState } from "react"; 14 13 import toast from "react-hot-toast"; 15 14 import useTransactionLifecycle from "src/hooks/useTransactionLifecycle"; ··· 25 24 title?: string; 26 25 } 27 26 28 - const Follow: FC<FollowProps> = ({ 27 + const Follow = ({ 29 28 onFollow, 30 29 buttonClassName, 31 30 account, 32 31 small, 33 32 title = "Follow" 34 - }) => { 33 + }: FollowProps) => { 35 34 const { currentAccount } = useAccountStore(); 36 35 const { isSuspended } = useAccountStatus(); 37 36 const { setShowAuthModal } = useAuthModalStore();
+2 -3
apps/web/src/components/Shared/Account/FollowUnfollowButton.tsx
··· 1 1 import stopEventPropagation from "@hey/helpers/stopEventPropagation"; 2 2 import type { AccountFragment } from "@hey/indexer"; 3 - import type { FC } from "react"; 4 3 import { useAccountStore } from "src/store/persisted/useAccountStore"; 5 4 import FollowWithRulesCheck from "./FollowWithRulesCheck"; 6 5 import Unfollow from "./Unfollow"; ··· 14 13 unfollowTitle?: string; 15 14 } 16 15 17 - const FollowUnfollowButton: FC<FollowUnfollowButtonProps> = ({ 16 + const FollowUnfollowButton = ({ 18 17 buttonClassName = "", 19 18 hideFollowButton = false, 20 19 hideUnfollowButton = false, 21 20 account, 22 21 small = false, 23 22 unfollowTitle = "Following" 24 - }) => { 23 + }: FollowUnfollowButtonProps) => { 25 24 const { currentAccount } = useAccountStore(); 26 25 27 26 if (currentAccount?.address === account.address) {
+2 -3
apps/web/src/components/Shared/Account/FollowWithRulesCheck.tsx
··· 1 1 import { getSimplePaymentDetails } from "@helpers/rules"; 2 2 import type { AccountFollowRules, AccountFragment } from "@hey/indexer"; 3 3 import { Button } from "@hey/ui"; 4 - import type { FC } from "react"; 5 4 import { useSuperFollowModalStore } from "src/store/non-persisted/modal/useSuperFollowModalStore"; 6 5 import Follow from "./Follow"; 7 6 ··· 11 10 small: boolean; 12 11 } 13 12 14 - const FollowWithRulesCheck: FC<FollowWithRulesCheckProps> = ({ 13 + const FollowWithRulesCheck = ({ 15 14 buttonClassName, 16 15 account, 17 16 small 18 - }) => { 17 + }: FollowWithRulesCheckProps) => { 19 18 const { setShowSuperFollowModal } = useSuperFollowModalStore(); 20 19 const { assetContract: requiredSimplePayment } = getSimplePaymentDetails( 21 20 account.rules as AccountFollowRules
+2 -3
apps/web/src/components/Shared/Account/Icons/Verified.tsx
··· 2 2 import { CheckBadgeIcon } from "@heroicons/react/24/solid"; 3 3 import { Tooltip } from "@hey/ui"; 4 4 import cn from "@hey/ui/cn"; 5 - import type { FC } from "react"; 6 5 7 6 interface VerifiedProps { 8 7 address: string; ··· 10 9 iconClassName?: string; 11 10 } 12 11 13 - const Verified: FC<VerifiedProps> = ({ 12 + const Verified = ({ 14 13 address, 15 14 showTooltip = false, 16 15 iconClassName = "" 17 - }) => { 16 + }: VerifiedProps) => { 18 17 if (!isVerified(address)) { 19 18 return null; 20 19 }
+1 -2
apps/web/src/components/Shared/Account/Suspend.tsx
··· 4 4 import { Permission, PermissionId } from "@hey/data/permissions"; 5 5 import { Toggle } from "@hey/ui"; 6 6 import { useMutation, useQuery } from "@tanstack/react-query"; 7 - import type { FC } from "react"; 8 7 import toast from "react-hot-toast"; 9 8 10 9 interface SuspendProps { 11 10 address: string; 12 11 } 13 12 14 - const Suspend: FC<SuspendProps> = ({ address }) => { 13 + const Suspend = ({ address }: SuspendProps) => { 15 14 const { data: account, isLoading } = useQuery( 16 15 trpc.internal.account.queryOptions({ address }) 17 16 );
+2 -3
apps/web/src/components/Shared/Account/Unfollow.tsx
··· 9 9 useUnfollowMutation 10 10 } from "@hey/indexer"; 11 11 import { Button } from "@hey/ui"; 12 - import type { FC } from "react"; 13 12 import { useState } from "react"; 14 13 import toast from "react-hot-toast"; 15 14 import useTransactionLifecycle from "src/hooks/useTransactionLifecycle"; ··· 24 23 title: string; 25 24 } 26 25 27 - const Unfollow: FC<UnfollowProps> = ({ 26 + const Unfollow = ({ 28 27 buttonClassName, 29 28 account, 30 29 small, 31 30 title 32 - }) => { 31 + }: UnfollowProps) => { 33 32 const { currentAccount } = useAccountStore(); 34 33 const { isSuspended } = useAccountStatus(); 35 34 const { setShowAuthModal } = useAuthModalStore();
+3 -3
apps/web/src/components/Shared/AccountPreview.tsx
··· 8 8 import { Card, Image } from "@hey/ui"; 9 9 import * as HoverCard from "@radix-ui/react-hover-card"; 10 10 import plur from "plur"; 11 - import type { FC, ReactNode } from "react"; 11 + import type { ReactNode } from "react"; 12 12 import { useState } from "react"; 13 13 import FollowUnfollowButton from "./Account/FollowUnfollowButton"; 14 14 import Verified from "./Account/Icons/Verified"; ··· 24 24 showUserPreview?: boolean; 25 25 } 26 26 27 - const AccountPreview: FC<AccountPreviewProps> = ({ 27 + const AccountPreview = ({ 28 28 children, 29 29 username, 30 30 address, 31 31 showUserPreview = true 32 - }) => { 32 + }: AccountPreviewProps) => { 33 33 const [loadAccount, { data, loading }] = useFullAccountLazyQuery({ 34 34 fetchPolicy: "cache-and-network" 35 35 });
+3 -3
apps/web/src/components/Shared/Accounts.tsx
··· 1 1 import type { AccountFragment } from "@hey/indexer"; 2 - import type { FC, ReactNode } from "react"; 2 + import type { ReactNode } from "react"; 3 3 import FallbackAccountName from "./FallbackAccountName"; 4 4 5 5 interface AccountsProps { ··· 7 7 accounts: AccountFragment[]; 8 8 } 9 9 10 - const Accounts: FC<AccountsProps> = ({ context, accounts }) => { 11 - const Wrapper: FC<{ children: ReactNode }> = ({ children }) => ( 10 + const Accounts = ({ context, accounts }: AccountsProps) => { 11 + const Wrapper = ({ children }: { children: ReactNode }) => ( 12 12 <> 13 13 {children} 14 14 {context && <span> {context}</span>}
+1 -2
apps/web/src/components/Shared/Attachments.tsx
··· 5 5 import { Image, LightBox } from "@hey/ui"; 6 6 import cn from "@hey/ui/cn"; 7 7 import { getSrc } from "@livepeer/react/external"; 8 - import type { FC } from "react"; 9 8 import { memo, useState } from "react"; 10 9 import Audio from "./Audio"; 11 10 import Video from "./Video"; ··· 30 29 attachments: MetadataAttachment[]; 31 30 } 32 31 33 - const Attachments: FC<AttachmentsProps> = ({ asset, attachments }) => { 32 + const Attachments = ({ asset, attachments }: AttachmentsProps) => { 34 33 const [expandedImage, setExpandedImage] = useState<null | string>(null); 35 34 const processedAttachments = attachments.slice(0, 10); 36 35
+3 -3
apps/web/src/components/Shared/Audio/CoverImage.tsx
··· 6 6 import sanitizeDStorageUrl from "@hey/helpers/sanitizeDStorageUrl"; 7 7 import { Image, Spinner } from "@hey/ui"; 8 8 import cn from "@hey/ui/cn"; 9 - import type { ChangeEvent, FC, Ref } from "react"; 9 + import type { ChangeEvent, Ref } from "react"; 10 10 import { useState } from "react"; 11 11 12 12 interface CoverImageProps { ··· 17 17 setCover: (previewUri: string, url: string, mimeType: string) => void; 18 18 } 19 19 20 - const CoverImage: FC<CoverImageProps> = ({ 20 + const CoverImage = ({ 21 21 cover, 22 22 expandCover, 23 23 imageRef, 24 24 isNew = false, 25 25 setCover 26 - }) => { 26 + }: CoverImageProps) => { 27 27 const [isSubmitting, setIsSubmitting] = useState(false); 28 28 29 29 const onError = (error: any) => {
+2 -2
apps/web/src/components/Shared/Audio/Player.tsx
··· 1 1 import type { APITypes } from "plyr-react"; 2 2 import Plyr from "plyr-react"; 3 - import type { FC, Ref } from "react"; 4 3 import "plyr-react/plyr.css"; 4 + import type { Ref } from "react"; 5 5 import { memo } from "react"; 6 6 7 7 interface PlayerProps { ··· 9 9 src: string; 10 10 } 11 11 12 - const Player: FC<PlayerProps> = ({ playerRef, src }) => { 12 + const Player = ({ playerRef, src }: PlayerProps) => { 13 13 return ( 14 14 <Plyr 15 15 options={{
+3 -3
apps/web/src/components/Shared/Audio/index.tsx
··· 1 1 import { PauseIcon, PlayIcon } from "@heroicons/react/24/solid"; 2 2 import stopEventPropagation from "@hey/helpers/stopEventPropagation"; 3 3 import type { APITypes } from "plyr-react"; 4 - import type { ChangeEvent, FC } from "react"; 4 + import type { ChangeEvent } from "react"; 5 5 import { useRef, useState } from "react"; 6 6 import { usePostAudioStore } from "src/store/non-persisted/post/usePostAudioStore"; 7 7 import { z } from "zod"; ··· 23 23 title?: string; 24 24 } 25 25 26 - const Audio: FC<AudioProps> = ({ 26 + const Audio = ({ 27 27 artist, 28 28 expandCover, 29 29 isNew = false, 30 30 poster, 31 31 src, 32 32 title 33 - }) => { 33 + }: AudioProps) => { 34 34 const { audioPost, setAudioPost } = usePostAudioStore(); 35 35 const [newPreviewUri, setNewPreviewUri] = useState<null | string>(null); 36 36 const [playing, setPlaying] = useState(false);
+1 -2
apps/web/src/components/Shared/Auth/AuthMessage.tsx
··· 1 1 import { H4 } from "@hey/ui"; 2 - import type { FC } from "react"; 3 2 4 3 interface AuthMessageProps { 5 4 description: string; 6 5 title: string; 7 6 } 8 7 9 - const AuthMessage: FC<AuthMessageProps> = ({ description, title }) => ( 8 + const AuthMessage = ({ description, title }: AuthMessageProps) => ( 10 9 <div className="space-y-2"> 11 10 <H4>{title}</H4> 12 11 <div className="ld-text-gray-500 text-sm">{description}</div>
+2 -2
apps/web/src/components/Shared/Auth/Login.tsx
··· 12 12 } from "@hey/indexer"; 13 13 import { Button, Card, ErrorMessage } from "@hey/ui"; 14 14 import { useRouter } from "next/router"; 15 - import type { Dispatch, FC, SetStateAction } from "react"; 15 + import type { Dispatch, SetStateAction } from "react"; 16 16 import { useState } from "react"; 17 17 import toast from "react-hot-toast"; 18 18 import { CHAIN } from "src/constants"; ··· 27 27 setHasAccounts: Dispatch<SetStateAction<boolean>>; 28 28 } 29 29 30 - const Login: FC<LoginProps> = ({ setHasAccounts }) => { 30 + const Login = ({ setHasAccounts }: LoginProps) => { 31 31 const { reload } = useRouter(); 32 32 const [isSubmitting, setIsSubmitting] = useState(false); 33 33 const [loggingInAccountId, setLoggingInAccountId] = useState<null | string>(
+2 -6
apps/web/src/components/Shared/AvatarUpload.tsx
··· 10 10 import type { Area } from "@hey/image-cropper/types"; 11 11 import { Button, Image, Modal } from "@hey/ui"; 12 12 import cn from "@hey/ui/cn"; 13 - import type { ChangeEvent, FC } from "react"; 13 + import type { ChangeEvent } from "react"; 14 14 import { useState } from "react"; 15 15 import toast from "react-hot-toast"; 16 16 ··· 20 20 isSmall?: boolean; 21 21 } 22 22 23 - const AvatarUpload: FC<AvatarUploadProps> = ({ 24 - src, 25 - setSrc, 26 - isSmall = false 27 - }) => { 23 + const AvatarUpload = ({ src, setSrc, isSmall = false }: AvatarUploadProps) => { 28 24 const [isSubmitting, setIsSubmitting] = useState(false); 29 25 const [pictureSrc, setPictureSrc] = useState(src); 30 26 const [showPictureCropModal, setShowPictureCropModal] = useState(false);
+2 -2
apps/web/src/components/Shared/ChooseFile.tsx
··· 1 1 import { PaperClipIcon } from "@heroicons/react/24/outline"; 2 - import type { ChangeEventHandler, FC } from "react"; 2 + import type { ChangeEventHandler } from "react"; 3 3 import { useId } from "react"; 4 4 5 5 interface ChooseFileProps { ··· 7 7 disabled?: boolean; 8 8 } 9 9 10 - const ChooseFile: FC<ChooseFileProps> = ({ onChange, disabled }) => { 10 + const ChooseFile = ({ onChange, disabled }: ChooseFileProps) => { 11 11 const id = useId(); 12 12 13 13 return (
+1 -2
apps/web/src/components/Shared/CountdownTimer.tsx
··· 1 - import type { FC } from "react"; 2 1 import { useEffect, useState } from "react"; 3 2 4 3 type TimeLeft = { ··· 12 11 targetDate: string; 13 12 } 14 13 15 - const CountdownTimer: FC<CountdownTimerProps> = ({ targetDate }) => { 14 + const CountdownTimer = ({ targetDate }: CountdownTimerProps) => { 16 15 const calculateTimeLeft = (): TimeLeft => { 17 16 const now = new Date().getTime(); 18 17 const target = new Date(targetDate).getTime() - 30000; // Subtract 30 seconds
+1 -2
apps/web/src/components/Shared/Cover.tsx
··· 1 1 import { BRAND_COLOR, COVER, STATIC_IMAGES_URL } from "@hey/data/constants"; 2 2 import imageKit from "@hey/helpers/imageKit"; 3 3 import sanitizeDStorageUrl from "@hey/helpers/sanitizeDStorageUrl"; 4 - import type { FC } from "react"; 5 4 6 5 interface CoverProps { 7 6 cover: string; 8 7 } 9 8 10 - const Cover: FC<CoverProps> = ({ cover }) => { 9 + const Cover = ({ cover }: CoverProps) => { 11 10 const isDefaultCover = cover.includes(STATIC_IMAGES_URL); 12 11 const backgroundImage = isDefaultCover 13 12 ? `${STATIC_IMAGES_URL}/patterns/2.svg`
+2 -2
apps/web/src/components/Shared/CoverUpload.tsx
··· 10 10 import { getCroppedImg } from "@hey/image-cropper/cropUtils"; 11 11 import type { Area } from "@hey/image-cropper/types"; 12 12 import { Button, Image, Modal } from "@hey/ui"; 13 - import type { ChangeEvent, FC } from "react"; 13 + import type { ChangeEvent } from "react"; 14 14 import { useState } from "react"; 15 15 import toast from "react-hot-toast"; 16 16 ··· 19 19 setSrc: (src: string) => void; 20 20 } 21 21 22 - const CoverUpload: FC<CoverUploadProps> = ({ src, setSrc }) => { 22 + const CoverUpload = ({ src, setSrc }: CoverUploadProps) => { 23 23 const [isSubmitting, setIsSubmitting] = useState(false); 24 24 const [pictureSrc, setPictureSrc] = useState(src); 25 25 const [showPictureCropModal, setShowPictureCropModal] = useState(false);
+2 -3
apps/web/src/components/Shared/DismissRecommendedAccount.tsx
··· 3 3 type AccountFragment, 4 4 useMlDismissRecommendedAccountsMutation 5 5 } from "@hey/indexer"; 6 - import type { FC } from "react"; 7 6 8 7 interface DismissRecommendedAccountProps { 9 8 account: AccountFragment; 10 9 } 11 10 12 - const DismissRecommendedAccount: FC<DismissRecommendedAccountProps> = ({ 11 + const DismissRecommendedAccount = ({ 13 12 account 14 - }) => { 13 + }: DismissRecommendedAccountProps) => { 15 14 const [dismissRecommendedAccount] = useMlDismissRecommendedAccountsMutation({ 16 15 update: (cache) => { 17 16 cache.evict({ id: cache.identify(account) });
+1 -2
apps/web/src/components/Shared/Embed/Quote.tsx
··· 1 1 import QuotedPost from "@components/Post/QuotedPost"; 2 2 import type { PostFragment } from "@hey/indexer"; 3 - import type { FC } from "react"; 4 3 import Wrapper from "./Wrapper"; 5 4 6 5 interface QuoteProps { 7 6 post: PostFragment; 8 7 } 9 8 10 - const Quote: FC<QuoteProps> = ({ post }) => { 9 + const Quote = ({ post }: QuoteProps) => { 11 10 if (!post) { 12 11 return null; 13 12 }
+3 -3
apps/web/src/components/Shared/Embed/Wrapper.tsx
··· 1 1 import stopEventPropagation from "@hey/helpers/stopEventPropagation"; 2 2 import { Card } from "@hey/ui"; 3 3 import cn from "@hey/ui/cn"; 4 - import type { FC, ReactNode } from "react"; 4 + import type { ReactNode } from "react"; 5 5 6 6 interface WrapperProps { 7 7 children: ReactNode; ··· 9 9 zeroPadding?: boolean; 10 10 } 11 11 12 - const Wrapper: FC<WrapperProps> = ({ 12 + const Wrapper = ({ 13 13 children, 14 14 className = "", 15 15 zeroPadding = false 16 - }) => ( 16 + }: WrapperProps) => ( 17 17 <Card 18 18 className={cn("mt-3 cursor-auto", className, { "p-5": !zeroPadding })} 19 19 forceRounded
+2 -2
apps/web/src/components/Shared/EmojiPicker/List.tsx
··· 4 4 import type { Emoji } from "@hey/types/misc"; 5 5 import { ErrorMessage, Input } from "@hey/ui"; 6 6 import cn from "@hey/ui/cn"; 7 - import type { ChangeEvent, FC } from "react"; 7 + import type { ChangeEvent } from "react"; 8 8 import { useEffect, useRef, useState } from "react"; 9 9 import useEmojis from "src/hooks/prosekit/useEmojis"; 10 10 import Loader from "../Loader"; ··· 13 13 setEmoji: (emoji: string) => void; 14 14 } 15 15 16 - const List: FC<ListProps> = ({ setEmoji }) => { 16 + const List = ({ setEmoji }: ListProps) => { 17 17 const inputRef = useRef<HTMLInputElement>(null); 18 18 const [searchText, setSearchText] = useState(""); 19 19 const { emojis, error, isLoading } = useEmojis({
+3 -3
apps/web/src/components/Shared/EmojiPicker/index.tsx
··· 2 2 import stopEventPropagation from "@hey/helpers/stopEventPropagation"; 3 3 import { Tooltip } from "@hey/ui"; 4 4 import { useClickAway } from "@uidotdev/usehooks"; 5 - import type { Dispatch, FC, MutableRefObject, SetStateAction } from "react"; 5 + import type { Dispatch, MutableRefObject, SetStateAction } from "react"; 6 6 import List from "./List"; 7 7 8 8 interface EmojiPickerProps { ··· 12 12 showEmojiPicker: boolean; 13 13 } 14 14 15 - const EmojiPicker: FC<EmojiPickerProps> = ({ 15 + const EmojiPicker = ({ 16 16 emoji, 17 17 setEmoji, 18 18 setShowEmojiPicker, 19 19 showEmojiPicker 20 - }) => { 20 + }: EmojiPickerProps) => { 21 21 const listRef = useClickAway(() => { 22 22 setShowEmojiPicker(false); 23 23 }) as MutableRefObject<HTMLDivElement>;
+3 -3
apps/web/src/components/Shared/FallbackAccountName.tsx
··· 2 2 import type { AccountFragment } from "@hey/indexer"; 3 3 import cn from "@hey/ui/cn"; 4 4 import Link from "next/link"; 5 - import type { FC, ReactNode } from "react"; 5 + import type { ReactNode } from "react"; 6 6 import Slug from "./Slug"; 7 7 8 8 interface FallbackAccountNameProps { ··· 11 11 separator?: ReactNode; 12 12 } 13 13 14 - const FallbackAccountName: FC<FallbackAccountNameProps> = ({ 14 + const FallbackAccountName = ({ 15 15 className = "", 16 16 account, 17 17 separator = "" 18 - }) => { 18 + }: FallbackAccountNameProps) => { 19 19 if (!account) { 20 20 return null; 21 21 }
+3 -3
apps/web/src/components/Shared/FeedFocusType.tsx
··· 1 1 import { MainContentFocus } from "@hey/indexer"; 2 2 import cn from "@hey/ui/cn"; 3 - import type { Dispatch, FC, SetStateAction } from "react"; 3 + import type { Dispatch, SetStateAction } from "react"; 4 4 5 5 interface FeedLinkProps { 6 6 focus?: MainContentFocus; ··· 9 9 type?: MainContentFocus; 10 10 } 11 11 12 - const FeedLink: FC<FeedLinkProps> = ({ focus, name, setFocus, type }) => ( 12 + const FeedLink = ({ focus, name, setFocus, type }: FeedLinkProps) => ( 13 13 <button 14 14 aria-label={name} 15 15 className={cn( ··· 29 29 setFocus: Dispatch<SetStateAction<MainContentFocus | undefined>>; 30 30 } 31 31 32 - const FeedFocusType: FC<FeedFocusTypeProps> = ({ focus, setFocus }) => ( 32 + const FeedFocusType = ({ focus, setFocus }: FeedFocusTypeProps) => ( 33 33 <div className="mx-5 my-5 flex flex-wrap gap-3 sm:mx-0"> 34 34 <FeedLink focus={focus} name="All posts" setFocus={setFocus} /> 35 35 <FeedLink
+2 -8
apps/web/src/components/Shared/Fund/FundAccount/Fund.tsx
··· 4 4 import { Events } from "@hey/data/events"; 5 5 import { useDepositMutation } from "@hey/indexer"; 6 6 import { Button, Card, Input, Spinner } from "@hey/ui"; 7 - import { 8 - type ChangeEvent, 9 - type FC, 10 - type RefObject, 11 - useRef, 12 - useState 13 - } from "react"; 7 + import { type ChangeEvent, type RefObject, useRef, useState } from "react"; 14 8 import toast from "react-hot-toast"; 15 9 import usePollTransactionStatus from "src/hooks/usePollTransactionStatus"; 16 10 import usePreventScrollOnNumberInput from "src/hooks/usePreventScrollOnNumberInput"; ··· 25 19 onSuccess?: () => void; 26 20 } 27 21 28 - const Fund: FC<FundProps> = ({ isHeyTip, useNativeToken, onSuccess }) => { 22 + const Fund = ({ isHeyTip, useNativeToken, onSuccess }: FundProps) => { 29 23 const { setShowFundModal } = useFundModalStore(); 30 24 const [isSubmitting, setIsSubmitting] = useState(false); 31 25 const [amount, setAmount] = useState(2);
+2 -3
apps/web/src/components/Shared/Fund/FundButton.tsx
··· 1 1 import { Button } from "@hey/ui"; 2 - import type { FC } from "react"; 3 2 import { useFundModalStore } from "src/store/non-persisted/modal/useFundModalStore"; 4 3 5 4 interface FundButtonProps { ··· 9 8 className?: string; 10 9 } 11 10 12 - const FundButton: FC<FundButtonProps> = ({ 11 + const FundButton = ({ 13 12 label = "Fund account", 14 13 size = "md", 15 14 outline = false, 16 15 className = "" 17 - }) => { 16 + }: FundButtonProps) => { 18 17 const { setShowFundModal } = useFundModalStore(); 19 18 20 19 return (
+3 -3
apps/web/src/components/Shared/Group/Join.tsx
··· 5 5 import { Events } from "@hey/data/events"; 6 6 import { type GroupFragment, useJoinGroupMutation } from "@hey/indexer"; 7 7 import { Button } from "@hey/ui"; 8 - import { type FC, useState } from "react"; 8 + import { useState } from "react"; 9 9 import toast from "react-hot-toast"; 10 10 import useTransactionLifecycle from "src/hooks/useTransactionLifecycle"; 11 11 import { useAccountStatus } from "src/store/non-persisted/useAccountStatus"; ··· 18 18 title?: string; 19 19 } 20 20 21 - const Join: FC<JoinProps> = ({ 21 + const Join = ({ 22 22 group, 23 23 setJoined, 24 24 small, 25 25 className = "", 26 26 title = "Join" 27 - }) => { 27 + }: JoinProps) => { 28 28 const { isSuspended } = useAccountStatus(); 29 29 const [isSubmitting, setIsSubmitting] = useState(false); 30 30 const { cache } = useApolloClient();
+2 -3
apps/web/src/components/Shared/Group/JoinLeaveButton.tsx
··· 1 1 import stopEventPropagation from "@hey/helpers/stopEventPropagation"; 2 2 import type { GroupFragment } from "@hey/indexer"; 3 - import type { FC } from "react"; 4 3 import { useEffect, useState } from "react"; 5 4 import { useAccountStore } from "src/store/persisted/useAccountStore"; 6 5 import JoinWithRulesCheck from "./JoinWithRulesCheck"; ··· 13 12 small?: boolean; 14 13 } 15 14 16 - const JoinLeaveButton: FC<JoinLeaveButtonProps> = ({ 15 + const JoinLeaveButton = ({ 17 16 hideJoinButton = false, 18 17 hideLeaveButton = false, 19 18 group, 20 19 small = false 21 - }) => { 20 + }: JoinLeaveButtonProps) => { 22 21 const { currentAccount } = useAccountStore(); 23 22 const [joined, setJoined] = useState(group.operations?.isMember); 24 23
+2 -3
apps/web/src/components/Shared/Group/JoinWithRulesCheck.tsx
··· 4 4 } from "@helpers/rules"; 5 5 import type { GroupFragment, GroupRules } from "@hey/indexer"; 6 6 import { Button } from "@hey/ui"; 7 - import type { FC } from "react"; 8 7 import { useSuperJoinModalStore } from "src/store/non-persisted/modal/useSuperJoinModalStore"; 9 8 import Join from "./Join"; 10 9 ··· 14 13 small: boolean; 15 14 } 16 15 17 - const JoinWithRulesCheck: FC<JoinWithRulesCheckProps> = ({ 16 + const JoinWithRulesCheck = ({ 18 17 group, 19 18 setJoined, 20 19 small 21 - }) => { 20 + }: JoinWithRulesCheckProps) => { 22 21 const { setShowSuperJoinModal } = useSuperJoinModalStore(); 23 22 const { assetContract: requiredSimplePayment } = getSimplePaymentDetails( 24 23 group.rules as GroupRules
+2 -2
apps/web/src/components/Shared/Group/Leave.tsx
··· 9 9 useLeaveGroupMutation 10 10 } from "@hey/indexer"; 11 11 import { Button } from "@hey/ui"; 12 - import { type FC, useState } from "react"; 12 + import { useState } from "react"; 13 13 import toast from "react-hot-toast"; 14 14 import useTransactionLifecycle from "src/hooks/useTransactionLifecycle"; 15 15 import { useAccountStatus } from "src/store/non-persisted/useAccountStatus"; ··· 20 20 small: boolean; 21 21 } 22 22 23 - const Leave: FC<LeaveProps> = ({ group, setJoined, small }) => { 23 + const Leave = ({ group, setJoined, small }: LeaveProps) => { 24 24 const { isSuspended } = useAccountStatus(); 25 25 const [isSubmitting, setIsSubmitting] = useState(false); 26 26 const { cache } = useApolloClient();
+3 -3
apps/web/src/components/Shared/ImageCropperController.tsx
··· 6 6 import type { Area, Point, Size } from "@hey/image-cropper/types"; 7 7 import Slider from "rc-slider"; 8 8 import "rc-slider/assets/index.css"; 9 - import type { Dispatch, FC } from "react"; 9 + import type { Dispatch } from "react"; 10 10 import { useEffect, useRef, useState } from "react"; 11 11 import useResizeObserver from "use-resize-observer"; 12 12 ··· 16 16 targetSize: Size; 17 17 } 18 18 19 - const ImageCropperController: FC<ImageCropperControllerProps> = ({ 19 + const ImageCropperController = ({ 20 20 imageSrc, 21 21 setCroppedAreaPixels, 22 22 targetSize 23 - }) => { 23 + }: ImageCropperControllerProps) => { 24 24 const [crop, setCrop] = useState<Point>({ x: 0, y: 0 }); 25 25 const [zoom, setZoom] = useState(1); 26 26 const [maxZoom, setMaxZoom] = useState(1);
+1 -2
apps/web/src/components/Shared/LazySingleAccount.tsx
··· 1 1 import { useAccountQuery } from "@hey/indexer"; 2 - import type { FC } from "react"; 3 2 import type { Address } from "viem"; 4 3 import SingleAccountShimmer from "./Shimmer/SingleAccountShimmer"; 5 4 import SingleAccount from "./SingleAccount"; ··· 9 8 address: Address; 10 9 } 11 10 12 - const LazySingleAccount: FC<LazySingleAccountProps> = ({ address }) => { 11 + const LazySingleAccount = ({ address }: LazySingleAccountProps) => { 13 12 const { data, loading } = useAccountQuery({ 14 13 skip: !address, 15 14 variables: { request: { address } }
+2 -3
apps/web/src/components/Shared/LazySmallSingleAccount.tsx
··· 1 1 import { useAccountQuery } from "@hey/indexer"; 2 - import type { FC } from "react"; 3 2 import SmallSingleAccountShimmer from "./Shimmer/SmallSingleAccountShimmer"; 4 3 import SmallSingleAccount from "./SmallSingleAccount"; 5 4 ··· 9 8 linkToAccount?: boolean; 10 9 } 11 10 12 - const LazySmallSingleAccount: FC<LazySmallSingleAccountProps> = ({ 11 + const LazySmallSingleAccount = ({ 13 12 hideSlug = false, 14 13 address, 15 14 linkToAccount = false 16 - }) => { 15 + }: LazySmallSingleAccountProps) => { 17 16 const { data, loading } = useAccountQuery({ 18 17 variables: { request: { address } } 19 18 });
+1 -6
apps/web/src/components/Shared/Loader.tsx
··· 1 1 import { Spinner } from "@hey/ui"; 2 2 import cn from "@hey/ui/cn"; 3 - import type { FC } from "react"; 4 3 5 4 interface LoaderProps { 6 5 className?: string; ··· 8 7 small?: boolean; 9 8 } 10 9 11 - const Loader: FC<LoaderProps> = ({ 12 - className = "", 13 - message, 14 - small = false 15 - }) => { 10 + const Loader = ({ className = "", message, small = false }: LoaderProps) => { 16 11 return ( 17 12 <div className={cn("space-y-2 text-center font-bold", className)}> 18 13 <Spinner className="mx-auto" size={small ? "sm" : "md"} />
+3 -3
apps/web/src/components/Shared/LoginButton.tsx
··· 1 1 import { STATIC_IMAGES_URL } from "@hey/data/constants"; 2 2 import { Button } from "@hey/ui"; 3 3 import cn from "@hey/ui/cn"; 4 - import type { FC, MouseEvent } from "react"; 4 + import type { MouseEvent } from "react"; 5 5 import { useAuthModalStore } from "src/store/non-persisted/modal/useAuthModalStore"; 6 6 7 7 interface LoginButtonProps { ··· 11 11 title?: string; 12 12 } 13 13 14 - const LoginButton: FC<LoginButtonProps> = ({ 14 + const LoginButton = ({ 15 15 className = "", 16 16 isBig = false, 17 17 isFullWidth = false, 18 18 title = "Login" 19 - }) => { 19 + }: LoginButtonProps) => { 20 20 const { setShowAuthModal } = useAuthModalStore(); 21 21 22 22 const handleClick = (event: MouseEvent<HTMLButtonElement>) => {
+1 -2
apps/web/src/components/Shared/Markup/MarkupLink/ExternalLink.tsx
··· 2 2 import truncateUrl from "@hey/helpers/truncateUrl"; 3 3 import type { MarkupLinkProps } from "@hey/types/misc"; 4 4 import Link from "next/link"; 5 - import type { FC } from "react"; 6 5 7 - const ExternalLink: FC<MarkupLinkProps> = ({ title }) => { 6 + const ExternalLink = ({ title }: MarkupLinkProps) => { 8 7 let href = title; 9 8 10 9 if (!href) {
+1 -2
apps/web/src/components/Shared/Markup/MarkupLink/Hashtag.tsx
··· 1 1 import stopEventPropagation from "@hey/helpers/stopEventPropagation"; 2 2 import type { MarkupLinkProps } from "@hey/types/misc"; 3 3 import Link from "next/link"; 4 - import type { FC } from "react"; 5 4 6 - const Hashtag: FC<MarkupLinkProps> = ({ title }) => { 5 + const Hashtag = ({ title }: MarkupLinkProps) => { 7 6 if (!title) { 8 7 return null; 9 8 }
+1 -2
apps/web/src/components/Shared/Markup/MarkupLink/Mention.tsx
··· 3 3 import stopEventPropagation from "@hey/helpers/stopEventPropagation"; 4 4 import type { MarkupLinkProps } from "@hey/types/misc"; 5 5 import Link from "next/link"; 6 - import type { FC } from "react"; 7 6 8 - const Mention: FC<MarkupLinkProps> = ({ mentions, title }) => { 7 + const Mention = ({ mentions, title }: MarkupLinkProps) => { 9 8 const username = title; 10 9 11 10 if (!username) {
+2 -6
apps/web/src/components/Shared/Markup/index.tsx
··· 1 1 import { Regex } from "@hey/data/regex"; 2 2 import trimify from "@hey/helpers/trimify"; 3 3 import type { PostMentionFragment } from "@hey/indexer"; 4 - import { type FC, memo } from "react"; 4 + import { memo } from "react"; 5 5 import ReactMarkdown from "react-markdown"; 6 6 import remarkBreaks from "remark-breaks"; 7 7 // @ts-expect-error ··· 24 24 mentions?: PostMentionFragment[]; 25 25 } 26 26 27 - const Markup: FC<MarkupProps> = ({ 28 - children, 29 - className = "", 30 - mentions = [] 31 - }) => { 27 + const Markup = ({ children, className = "", mentions = [] }: MarkupProps) => { 32 28 if (!children) { 33 29 return null; 34 30 }
+2 -2
apps/web/src/components/Shared/MenuTransition.tsx
··· 1 1 import { Transition } from "@headlessui/react"; 2 - import type { FC, ReactNode } from "react"; 2 + import type { ReactNode } from "react"; 3 3 import { Fragment } from "react"; 4 4 5 5 interface MenuTransitionProps { ··· 7 7 show?: boolean; 8 8 } 9 9 10 - const MenuTransition: FC<MenuTransitionProps> = ({ children, show }) => { 10 + const MenuTransition = ({ children, show }: MenuTransitionProps) => { 11 11 return ( 12 12 <Transition 13 13 as={Fragment}
+3 -3
apps/web/src/components/Shared/MetaDetails.tsx
··· 1 1 import { H6 } from "@hey/ui"; 2 2 import cn from "@hey/ui/cn"; 3 - import type { FC, ReactNode } from "react"; 3 + import type { ReactNode } from "react"; 4 4 import { toast } from "react-hot-toast"; 5 5 6 6 interface MetaDetailsProps { ··· 11 11 value?: string; 12 12 } 13 13 14 - const MetaDetails: FC<MetaDetailsProps> = ({ 14 + const MetaDetails = ({ 15 15 children, 16 16 icon, 17 17 noFlex = false, 18 18 title, 19 19 value 20 - }) => { 20 + }: MetaDetailsProps) => { 21 21 const handleClick = async () => { 22 22 if (value) { 23 23 await navigator.clipboard.writeText(value);
+1 -2
apps/web/src/components/Shared/Modal/Collectors.tsx
··· 6 6 useWhoExecutedActionOnPostQuery 7 7 } from "@hey/indexer"; 8 8 import { EmptyState, ErrorMessage } from "@hey/ui"; 9 - import type { FC } from "react"; 10 9 import { Virtuoso } from "react-virtuoso"; 11 10 import { useAccountStore } from "src/store/persisted/useAccountStore"; 12 11 ··· 14 13 postId: string; 15 14 } 16 15 17 - const Collectors: FC<CollectorsProps> = ({ postId }) => { 16 + const Collectors = ({ postId }: CollectorsProps) => { 18 17 const { currentAccount } = useAccountStore(); 19 18 20 19 const request: WhoExecutedActionOnPostRequest = {
+1 -2
apps/web/src/components/Shared/Modal/Followers.tsx
··· 4 4 import type { FollowersRequest } from "@hey/indexer"; 5 5 import { PageSize, useFollowersQuery } from "@hey/indexer"; 6 6 import { EmptyState, ErrorMessage } from "@hey/ui"; 7 - import type { FC } from "react"; 8 7 import { Virtuoso } from "react-virtuoso"; 9 8 import { useAccountStore } from "src/store/persisted/useAccountStore"; 10 9 ··· 13 12 address: string; 14 13 } 15 14 16 - const Followers: FC<FollowersProps> = ({ username, address }) => { 15 + const Followers = ({ username, address }: FollowersProps) => { 17 16 const { currentAccount } = useAccountStore(); 18 17 19 18 const request: FollowersRequest = {
+1 -2
apps/web/src/components/Shared/Modal/FollowersYouKnow.tsx
··· 6 6 useFollowersYouKnowQuery 7 7 } from "@hey/indexer"; 8 8 import { EmptyState, ErrorMessage } from "@hey/ui"; 9 - import type { FC } from "react"; 10 9 import { Virtuoso } from "react-virtuoso"; 11 10 import { useAccountStore } from "src/store/persisted/useAccountStore"; 12 11 ··· 15 14 address: string; 16 15 } 17 16 18 - const FollowersYouKnow: FC<FollowersYouKnowProps> = ({ username, address }) => { 17 + const FollowersYouKnow = ({ username, address }: FollowersYouKnowProps) => { 19 18 const { currentAccount } = useAccountStore(); 20 19 21 20 const request: FollowersYouKnowRequest = {
+1 -3
apps/web/src/components/Shared/NoBalanceError.tsx
··· 1 - import type { FC } from "react"; 2 - 3 1 interface NoBalanceErrorProps { 4 2 assetSymbol?: string; 5 3 } 6 4 7 - const NoBalanceError: FC<NoBalanceErrorProps> = ({ assetSymbol }) => { 5 + const NoBalanceError = ({ assetSymbol }: NoBalanceErrorProps) => { 8 6 return ( 9 7 <div className="text-sm"> 10 8 You don't have enough <b>{assetSymbol || "funds"}</b>
+2 -6
apps/web/src/components/Shared/PostWrapper.tsx
··· 1 1 import type { AnyPostFragment } from "@hey/indexer"; 2 2 import { useRouter } from "next/router"; 3 - import type { FC, ReactNode } from "react"; 3 + import type { ReactNode } from "react"; 4 4 5 5 interface PostWrapperProps { 6 6 children: ReactNode | ReactNode[]; ··· 8 8 post: AnyPostFragment; 9 9 } 10 10 11 - const PostWrapper: FC<PostWrapperProps> = ({ 12 - children, 13 - className = "", 14 - post 15 - }) => { 11 + const PostWrapper = ({ children, className = "", post }: PostWrapperProps) => { 16 12 const { push } = useRouter(); 17 13 18 14 const handleClick = () => {
+3 -3
apps/web/src/components/Shared/SearchAccounts.tsx
··· 5 5 useAccountsLazyQuery 6 6 } from "@hey/indexer"; 7 7 import { Card, Input } from "@hey/ui"; 8 - import type { ChangeEvent, FC } from "react"; 8 + import type { ChangeEvent } from "react"; 9 9 import Loader from "./Loader"; 10 10 import SmallSingleAccount from "./SmallSingleAccount"; 11 11 ··· 18 18 value: string; 19 19 } 20 20 21 - const SearchAccounts: FC<SearchAccountsProps> = ({ 21 + const SearchAccounts = ({ 22 22 error = false, 23 23 hideDropdown = false, 24 24 onChange, 25 25 onAccountSelected, 26 26 placeholder = "Search…", 27 27 value 28 - }) => { 28 + }: SearchAccountsProps) => { 29 29 const [searchAccounts, { data, loading }] = useAccountsLazyQuery(); 30 30 31 31 const handleSearch = (event: ChangeEvent<HTMLInputElement>) => {
+2 -3
apps/web/src/components/Shared/SingleAccount.tsx
··· 5 5 import { Image } from "@hey/ui"; 6 6 import cn from "@hey/ui/cn"; 7 7 import Link from "next/link"; 8 - import type { FC } from "react"; 9 8 import { memo } from "react"; 10 9 import FollowUnfollowButton from "./Account/FollowUnfollowButton"; 11 10 import Verified from "./Account/Icons/Verified"; ··· 23 22 showUserPreview?: boolean; 24 23 } 25 24 26 - const SingleAccount: FC<SingleAccountProps> = ({ 25 + const SingleAccount = ({ 27 26 hideFollowButton = false, 28 27 hideUnfollowButton = false, 29 28 isBig = false, ··· 31 30 account, 32 31 showBio = false, 33 32 showUserPreview = true 34 - }) => { 33 + }: SingleAccountProps) => { 35 34 const UserAvatar = () => ( 36 35 <Image 37 36 alt={account.address}
+2 -3
apps/web/src/components/Shared/SingleGroup.tsx
··· 4 4 import { Image } from "@hey/ui"; 5 5 import cn from "@hey/ui/cn"; 6 6 import Link from "next/link"; 7 - import type { FC } from "react"; 8 7 import { memo } from "react"; 9 8 import JoinLeaveButton from "./Group/JoinLeaveButton"; 10 9 import Markup from "./Markup"; ··· 18 17 group: GroupFragment; 19 18 } 20 19 21 - const SingleGroup: FC<SingleGroupProps> = ({ 20 + const SingleGroup = ({ 22 21 hideJoinButton = false, 23 22 hideLeaveButton = false, 24 23 isBig = false, 25 24 linkToGroup = true, 26 25 showDescription = false, 27 26 group 28 - }) => { 27 + }: SingleGroupProps) => { 29 28 const GroupAvatar = () => ( 30 29 <Image 31 30 alt={group.address}
+2 -3
apps/web/src/components/Shared/Slug.tsx
··· 1 1 import cn from "@hey/ui/cn"; 2 - import type { FC } from "react"; 3 2 4 3 interface SlugProps { 5 4 className?: string; ··· 8 7 useBrandColor?: boolean; 9 8 } 10 9 11 - const Slug: FC<SlugProps> = ({ 10 + const Slug = ({ 12 11 className = "", 13 12 prefix = "", 14 13 slug, 15 14 useBrandColor = false 16 - }) => { 15 + }: SlugProps) => { 17 16 return ( 18 17 <span 19 18 className={cn(
+3 -4
apps/web/src/components/Shared/SmallSingleAccount.tsx
··· 5 5 import { Image } from "@hey/ui"; 6 6 import cn from "@hey/ui/cn"; 7 7 import Link from "next/link"; 8 - import type { FC } from "react"; 9 8 import { memo } from "react"; 10 9 import Verified from "./Account/Icons/Verified"; 11 10 import Slug from "./Slug"; ··· 18 17 timestamp?: Date; 19 18 } 20 19 21 - const SmallSingleAccount: FC<SmallSingleAccountProps> = ({ 20 + const SmallSingleAccount = ({ 22 21 hideSlug = false, 23 22 linkToAccount = false, 24 23 account, 25 24 smallAvatar = false, 26 - timestamp = "" 27 - }) => { 25 + timestamp 26 + }: SmallSingleAccountProps) => { 28 27 const UserAvatar = () => ( 29 28 <Image 30 29 alt={account.address}
+2 -3
apps/web/src/components/Shared/SwitchNetwork.tsx
··· 1 1 import { ArrowsRightLeftIcon } from "@heroicons/react/24/outline"; 2 2 import { Button } from "@hey/ui"; 3 - import type { FC } from "react"; 4 3 import { useSwitchChain } from "wagmi"; 5 4 6 5 interface SwitchNetworkProps { ··· 10 9 toChainId: number; 11 10 } 12 11 13 - const SwitchNetwork: FC<SwitchNetworkProps> = ({ 12 + const SwitchNetwork = ({ 14 13 className = "", 15 14 onSwitch, 16 15 title = "Switch Network", 17 16 toChainId 18 - }) => { 17 + }: SwitchNetworkProps) => { 19 18 const { switchChain } = useSwitchChain(); 20 19 21 20 return (
+1 -3
apps/web/src/components/Shared/TipIcon.tsx
··· 1 - import type { FC } from "react"; 2 - 3 1 interface TipIconProps { 4 2 className?: string; 5 3 } 6 4 7 - export const TipIcon: FC<TipIconProps> = ({ className }) => ( 5 + export const TipIcon = ({ className }: TipIconProps) => ( 8 6 <svg 9 7 className={className} 10 8 fill="none"
+3 -3
apps/web/src/components/Shared/ToggleWithHelper.tsx
··· 1 1 import { H6, Toggle } from "@hey/ui"; 2 - import type { FC, ReactNode } from "react"; 2 + import type { ReactNode } from "react"; 3 3 4 4 interface ToggleWithHelperProps { 5 5 description: ReactNode; ··· 10 10 setOn: (on: boolean) => void; 11 11 } 12 12 13 - const ToggleWithHelper: FC<ToggleWithHelperProps> = ({ 13 + const ToggleWithHelper = ({ 14 14 description, 15 15 disabled = false, 16 16 heading, 17 17 icon, 18 18 on, 19 19 setOn 20 - }) => { 20 + }: ToggleWithHelperProps) => { 21 21 return ( 22 22 <div className="flex items-center justify-between"> 23 23 <div className="flex items-start space-x-3">
+3 -3
apps/web/src/components/Shared/Video.tsx
··· 10 10 import { Spinner } from "@hey/ui"; 11 11 import type { Src } from "@livepeer/react"; 12 12 import * as Player from "@livepeer/react/player"; 13 - import { type FC, type ReactNode, memo } from "react"; 13 + import { type ReactNode, memo } from "react"; 14 14 15 15 const PlayerLoading = () => ( 16 16 <div className="absolute inset-0 flex flex-col items-center justify-center"> ··· 24 24 title: string; 25 25 } 26 26 27 - const PlayerError: FC<ErrorProps> = ({ matcher, icon, title }) => { 27 + const PlayerError = ({ matcher, icon, title }: ErrorProps) => { 28 28 return ( 29 29 <Player.ErrorIndicator 30 30 matcher={matcher} ··· 43 43 poster?: string; 44 44 } 45 45 46 - const Video: FC<VideoProps> = ({ src, poster }) => { 46 + const Video = ({ src, poster }: VideoProps) => { 47 47 if (!src) { 48 48 return null; 49 49 }
+1 -2
apps/web/src/components/Shared/WalletAccount.tsx
··· 3 3 import formatAddress from "@hey/helpers/formatAddress"; 4 4 import { Image } from "@hey/ui"; 5 5 import Link from "next/link"; 6 - import type { FC } from "react"; 7 6 import type { Address } from "viem"; 8 7 import { useEnsName } from "wagmi"; 9 8 import Slug from "./Slug"; ··· 12 11 address: Address; 13 12 } 14 13 15 - const WalletAccount: FC<WalletAccountProps> = ({ address }) => { 14 + const WalletAccount = ({ address }: WalletAccountProps) => { 16 15 const { data, isLoading } = useEnsName({ address }); 17 16 18 17 const displayName = isLoading