Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
Remove unused code (#2514)
Browse files Browse the repository at this point in the history
* fix close modal

* clean up code
  • Loading branch information
alantoa authored Nov 9, 2023
1 parent 3d1ee18 commit 4613803
Show file tree
Hide file tree
Showing 28 changed files with 108 additions and 1,709 deletions.
21 changes: 0 additions & 21 deletions packages/app/components/header/header-right.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import { Button } from "@showtime-xyz/universal.button";
import { useIsDarkMode } from "@showtime-xyz/universal.hooks";
import { Plus } from "@showtime-xyz/universal.icon";
import { PressableHover } from "@showtime-xyz/universal.pressable-hover";
import { useRouter } from "@showtime-xyz/universal.router";
import { View } from "@showtime-xyz/universal.view";

import { HeaderDropdown } from "app/components/header-dropdown";
import { useRedirectToCreateDrop } from "app/hooks/use-redirect-to-create-drop";
import { useUser } from "app/hooks/use-user";
import {
CreatorChannelsTabBarIcon,
Expand All @@ -23,7 +20,6 @@ export const HeaderRight = ({ withBackground }: HeaderRightProps) => {
const router = useRouter();
const { isLoading, isAuthenticated, user } = useUser();
const isDark = useIsDarkMode();
const redirectToDrop = useRedirectToCreateDrop();
const navigateToLogin = useNavigateToLogin();

return (
Expand All @@ -49,23 +45,6 @@ export const HeaderRight = ({ withBackground }: HeaderRightProps) => {
<View tw="mx-2">
<NotificationsInHeader />
</View>
<View tw="mx-2">
<PressableHover onPress={redirectToDrop}>
<View
testID="mint-nft"
tw={[
"h-12 w-12 items-center justify-center rounded-full",
"bg-black dark:bg-white",
]}
>
<Plus
width={24}
height={24}
color={isDark ? "black" : "white"}
/>
</View>
</PressableHover>
</View>
</>
)}
<View tw="flex-row items-center md:mx-2">
Expand Down
1 change: 0 additions & 1 deletion packages/app/components/header/header.md.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ import { useAuth } from "app/hooks/auth/use-auth";
import { downloadCollectorList } from "app/hooks/use-download-collector-list";
import { useFooter } from "app/hooks/use-footer";
import { useNotifications } from "app/hooks/use-notifications";
import { useRedirectToCreateDrop } from "app/hooks/use-redirect-to-create-drop";
import { useUser } from "app/hooks/use-user";
import { Link, TextLink } from "app/navigation/link";
import { useNavigateToLogin } from "app/navigation/use-navigate-to";
Expand Down
37 changes: 0 additions & 37 deletions packages/app/components/polygon-scan-button.tsx

This file was deleted.

173 changes: 85 additions & 88 deletions packages/app/components/profile/profile.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import { useRedirectToCreatorTokenSocialShare } from "app/hooks/use-redirect-to-
import { useShare } from "app/hooks/use-share";
import { Sticky } from "app/lib/stickynode";
import { createParam } from "app/navigation/use-param";
import { MutateProvider } from "app/providers/mutate-provider";
import { NFT } from "app/types";
import { formatProfileRoutes, getFullSizeCover } from "app/utilities";

Expand Down Expand Up @@ -216,16 +215,15 @@ const Profile = ({ username }: ProfileScreenProps) => {
tw="min-h-screen w-full"
style={{ maxWidth: DESKTOP_PROFILE_WIDTH }}
>
<MutateProvider mutate={updateItem}>
<ProfileTabsNFTProvider tabType={isSelf ? type : undefined}>
{isProfileMdScreen ? (
<>
<CreatorTokensBanner />
<ProfileCover
tw="overflow-hidden rounded-b-3xl"
uri={getFullSizeCover(profileData?.data?.profile)}
/>
{/* <Pressable
<ProfileTabsNFTProvider tabType={isSelf ? type : undefined}>
{isProfileMdScreen ? (
<>
<CreatorTokensBanner />
<ProfileCover
tw="overflow-hidden rounded-b-3xl"
uri={getFullSizeCover(profileData?.data?.profile)}
/>
{/* <Pressable
tw={[
"absolute right-5 top-2 ml-2 h-8 w-8 items-center justify-center rounded-full bg-black/60",
]}
Expand All @@ -252,91 +250,90 @@ const Profile = ({ username }: ProfileScreenProps) => {
<ButtonGoldLinearGradient />
<GiftSolid width={26} height={26} color={colors.gray[900]} />
</Pressable> */}
<Button
tw="absolute right-5 top-2 ml-2 bg-black/60"
onPress={async () => {
await Clipboard.setStringAsync(
`https://${process.env.NEXT_PUBLIC_WEBSITE_DOMAIN}/@${username}`
);
toast.success("Copied!");
}}
style={{ height: 30 }}
size="small"
>
Share
</Button>
</>
) : null}
<View tw="w-full flex-row">
<View tw="flex-1">
<ProfileTop
address={username}
isBlocked={isBlocked}
profileData={profileData?.data}
isLoading={profileIsLoading}
isError={isError}
isSelf={isSelf}
/>
{/* <ProfileTabBar
<Button
tw="absolute right-5 top-2 ml-2 bg-black/60"
onPress={async () => {
await Clipboard.setStringAsync(
`https://${process.env.NEXT_PUBLIC_WEBSITE_DOMAIN}/@${username}`
);
toast.success("Copied!");
}}
style={{ height: 30 }}
size="small"
>
Share
</Button>
</>
) : null}
<View tw="w-full flex-row">
<View tw="flex-1">
<ProfileTop
address={username}
isBlocked={isBlocked}
profileData={profileData?.data}
isLoading={profileIsLoading}
isError={isError}
isSelf={isSelf}
/>
{/* <ProfileTabBar
onPress={onChangeTabBar}
routes={routes}
index={index}
/> */}

{type === "tokens" ? (
<>
<TokensTabHeader
channelId={channelId}
isSelf={isSelf}
messageCount={messageCount}
channelPermissions={channelPermissions}
{type === "tokens" ? (
<>
<TokensTabHeader
channelId={channelId}
isSelf={isSelf}
messageCount={messageCount}
channelPermissions={channelPermissions}
/>
<View tw="pl-5">
<CreatorTokenCollectors
creatorTokenId={
profileData?.data?.profile.creator_token?.id
}
name={profileData?.data?.profile.name}
username={username}
/>
<View tw="pl-5">
<CreatorTokenCollectors
creatorTokenId={
profileData?.data?.profile.creator_token?.id
}
name={profileData?.data?.profile.name}
username={username}
/>
<CreatorTokenCollected
profileId={profileId}
name={profileData?.data?.profile.name}
username={username}
/>
</View>
</>
) : null}

<InfiniteScrollList
useWindowScroll
numColumns={numColumns}
preserveScrollPosition
data={isBlocked ? [] : list}
keyExtractor={keyExtractor}
renderItem={renderItem}
overscan={12}
ListEmptyComponent={ListEmptyComponent}
ListFooterComponent={ListFooterComponent}
onEndReached={fetchMore}
/>
</View>
{isProfileMdScreen ? (
<View
style={{
width: 335,
}}
tw="animate-fade-in-250 ml-10"
>
<Sticky enabled>
<CreatorTokensPanel username={username} isSelf={isSelf} />
<TopPartCreatorTokens />
</Sticky>
</View>
<CreatorTokenCollected
profileId={profileId}
name={profileData?.data?.profile.name}
username={username}
/>
</View>
</>
) : null}

<InfiniteScrollList
useWindowScroll
numColumns={numColumns}
preserveScrollPosition
data={isBlocked ? [] : list}
keyExtractor={keyExtractor}
renderItem={renderItem}
overscan={12}
ListEmptyComponent={ListEmptyComponent}
ListFooterComponent={ListFooterComponent}
onEndReached={fetchMore}
/>
</View>
</ProfileTabsNFTProvider>
</MutateProvider>
{isProfileMdScreen ? (
<View
style={{
width: 335,
}}
tw="animate-fade-in-250 ml-10"
>
<Sticky enabled>
<CreatorTokensPanel username={username} isSelf={isSelf} />
<TopPartCreatorTokens />
</Sticky>
</View>
) : null}
</View>
</ProfileTabsNFTProvider>
</View>
<>
{isSelf ? (
Expand Down
36 changes: 0 additions & 36 deletions packages/app/components/social-button.tsx

This file was deleted.

53 changes: 0 additions & 53 deletions packages/app/components/viewability-tracker-flatlist.tsx

This file was deleted.

14 changes: 0 additions & 14 deletions packages/app/context/claim-context.ts

This file was deleted.

Loading

0 comments on commit 4613803

Please sign in to comment.