From 5ba53c6fea497d348a1d96c9f5f5e5cf67990aab Mon Sep 17 00:00:00 2001 From: teodorus-nathaniel Date: Thu, 14 Dec 2023 20:01:58 +0700 Subject: [PATCH] feat: make stake link open in new tab and go directly to the staker --- src/components/spaces/SpaceCard.tsx | 2 +- src/components/spaces/ViewSpace.tsx | 17 +++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/components/spaces/SpaceCard.tsx b/src/components/spaces/SpaceCard.tsx index a7af3b3c3..bb58ba6e5 100644 --- a/src/components/spaces/SpaceCard.tsx +++ b/src/components/spaces/SpaceCard.tsx @@ -58,7 +58,7 @@ export default function SpaceCard({ spaceId, ...props }: SpaceCardProps) { subtitle={} buttons={ spaceData && [ - , + , isMySpace ? ( }) -export const StakeButton = ({ spaceId }: { spaceId: SpaceId }) => { - return config.creatorIds?.includes(spaceId) ? ( - +export const StakeButton = ({ spaceStruct }: { spaceStruct: SpaceStruct }) => { + return config.creatorIds?.includes(spaceStruct.id) ? ( + Stake ) : null @@ -196,7 +201,7 @@ export const InnerViewSpace = (props: Props) => { Edit ) : ( - withStakeButton && + withStakeButton && ))} {withFollowButton && }