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

Commit

Permalink
cleaing for onchainsummer code (#2421)
Browse files Browse the repository at this point in the history
  • Loading branch information
alantoa authored Sep 4, 2023
1 parent f56995b commit 313efe9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
4 changes: 0 additions & 4 deletions packages/app/components/home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,6 @@ export const Home = () => {
return "popularCreators";
}

if (index === 1) {
return "onchainsummer";
}

if (index % Math.floor(feedItemLength * 0.25) === 0 && index !== 0) {
return "trendingCarousel";
}
Expand Down
15 changes: 5 additions & 10 deletions packages/app/components/trending/trending-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ type TrendingItemProps = ViewProps & {
numColumns: number;
tw?: string;
filter?: "all" | "music";
type?: "onchainsummer" | "default";
type?: "default";
};
export const TrendingItem = memo<TrendingItemProps>(function TrendingItem({
index,
Expand Down Expand Up @@ -76,14 +76,9 @@ export const TrendingItem = memo<TrendingItemProps>(function TrendingItem({
<View tw={["h-full w-full", tw]} style={viewStyle} {...rest}>
<RouteComponent
as={getNFTSlug(nft)}
// TODO: remove after onchainsummer
href={
type === "onchainsummer"
? getNFTSlug(nft)
: `${getNFTSlug(nft)}?initialScrollItemId=${
nft.nft_id
}&filter=${filter}&type=trendingNFTs`
}
href={`${getNFTSlug(nft)}?initialScrollItemId=${
nft.nft_id
}&filter=${filter}&type=trendingNFTs`}
>
<View
tw="overflow-hidden rounded-2xl"
Expand All @@ -103,7 +98,7 @@ export const TrendingItem = memo<TrendingItemProps>(function TrendingItem({
<NSFWGate show={nft.nsfw} nftId={nft.nft_id} variant="thumbnail" />
<View tw="absolute left-0 top-0 h-7 w-7 items-center justify-center rounded-br-2xl rounded-tl-2xl bg-black/50">
<Text tw="font-bold text-white" style={{ fontSize: 15 }}>
{type === "onchainsummer" ? "🟡" : index + 1}
{index + 1}
</Text>
</View>
</View>
Expand Down

0 comments on commit 313efe9

Please sign in to comment.