Skip to content

Commit

Permalink
Merge pull request #143 from BuidlerDAO/nig-811
Browse files Browse the repository at this point in the history
fix: nig-811
  • Loading branch information
Ken-LiuL authored May 14, 2024
2 parents e20b1b0 + d940913 commit 853ae29
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
8 changes: 6 additions & 2 deletions src/welcome/Profile/Community.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const Community = () => {
);

return (
<ul className="h-[250px]">
<ul className="min-h-[250px] flex-shrink-0">
{unlockedCommunities.map((item, i) => (
<li
key={i}
Expand Down Expand Up @@ -175,7 +175,11 @@ const Community = () => {
{renderUnlocked()}
{renderLocked()}
{selectedCommunity && selectedCommunity.status === 0 && (
<StackModal subject={selectedCommunity.subject} onClose={handleStakeModalClose} />
<StackModal
subject={selectedCommunity.subject}
ownerName={selectedCommunity.ownerUser.username}
onClose={handleStakeModalClose}
/>
)}
{
<ChatRoomDrawer
Expand Down
6 changes: 5 additions & 1 deletion src/welcome/Profile/community/ChatRoomDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,11 @@ export default function ChatRoomDrawer({ open = false, community, onClose }: Pro
</div>
<SendMessageBox disabled={myInfo?.isBlocked} sendMessage={sendMessage} />
{isStackModalOpen && community && (
<StackModal subject={community.subject} onClose={() => setIsStackModalOpen(false)} />
<StackModal
subject={community.subject}
ownerName={community.ownerUser.username}
onClose={() => setIsStackModalOpen(false)}
/>
)}
<MembersDrawer
isOwner={myInfo?.address === community?.subject}
Expand Down
8 changes: 6 additions & 2 deletions src/welcome/Profile/community/StackModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ import {
type ModalProps = {
// false cancel true confirm
onClose(fromConfirm?: boolean): void;
ownerName: string;
subject: string;
};
export default function StackModal({ onClose, subject }: ModalProps) {
export default function StackModal({ onClose, ownerName, subject }: ModalProps) {
const [currentTab, setCurrentTab] = useState<'stack' | 'unstack'>('stack');
const activedTabNavClassName = 'bg-[#9A6CF9] text-white';
const [sharesBalance, setSharesBalance] = useState<string | null>(null);
Expand All @@ -42,7 +43,10 @@ export default function StackModal({ onClose, subject }: ModalProps) {
}}
>
<div className="relative flex flex-col items-center pb-[24px]">
<h2 className="text-[24px] font-medium text-[#2E2E32]">Unlock Vincent&apos;s Community</h2>
<h2 className="flex text-[24px] font-medium text-[#2E2E32]">
Unlock&nbsp;<span className="max-w-[130px] truncate">{ownerName}</span>
&apos;s&nbsp;Community
</h2>
<div className="mt-[15px] h-[1px] w-[438px] bg-[#EBEEF0]"></div>

<p className="relative mt-[27px] pl-[25px] text-center text-sm text-[#919099]">
Expand Down

0 comments on commit 853ae29

Please sign in to comment.