Skip to content

Commit

Permalink
Added checks for DAO address and signin
Browse files Browse the repository at this point in the history
  • Loading branch information
Jikugodwill committed Sep 30, 2024
1 parent 949fb65 commit c413393
Showing 1 changed file with 22 additions and 21 deletions.
43 changes: 22 additions & 21 deletions apps/Mintbase/widget/Mintbase/Mini/Index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,18 @@ const { MbInputField } = VM.require(

const actualTabs = {
tabLabels: [
{title:"My Owned NFTs"},
{title: "My Minted NFTs"},
{title: "My Stores"},
{title: "Mint NFT"},
{title: "Store NFTs"},
{title: "Deploy Store"},
{title: "My Activity"},
{ title: "My Owned NFTs" },
{ title: "My Minted NFTs" },
{ title: "My Stores" },
{ title: "Mint NFT" },
{ title: "Store NFTs" },
{ title: "Deploy Store" },
{ title: "My Activity" },
],
};


if (connectedDao?.address) {
actualTabs.tabLabels.push({title: "DAO NFTs"})
if (connectedDao?.address && context?.accountId) {
actualTabs.tabLabels.push({ title: "_DAO NFTs" });
}

const hiddenTabs = actualTabs.tabLabels
Expand Down Expand Up @@ -165,10 +164,10 @@ const ContractSection = styled.div`
justify-content: space-evenly;
${getInputLabelFontType("big")}
a {
color: var(--blue-300,#4f5fa3);
color: var(--blue-300, #4f5fa3);
text-decoration: none;
svg {
color: var(--blue-300,#4f5fa3);
color: var(--blue-300, #4f5fa3);
}
}
svg {
Expand Down Expand Up @@ -670,15 +669,17 @@ const Index = ({}) => (
<PageContent />
</div>
<div className="floating-btns">
<Widget
src={`${config_account}/widget/Mintbase.App.DAOs.Connection`}
props={{
isDarkModeOn,
accountId,
localStorageData: connectedDao,
setLocalStorageData,
}}
/>
{context.accountId && (
<Widget
src={`${config_account}/widget/Mintbase.App.DAOs.Connection`}
props={{
isDarkModeOn,
accountId,
localStorageData: connectedDao,
setLocalStorageData,
}}
/>
)}
<Toggle onClick={switchChangeHandler} title="Toggle Theme">
<Widget
src={"${config_account}/widget/Mintbase.MbIcon"}
Expand Down

0 comments on commit c413393

Please sign in to comment.