From 024fbce156668f0ef2e427186e71aba0fe67622e Mon Sep 17 00:00:00 2001 From: Jiku Godwill Date: Fri, 31 May 2024 11:23:09 +0100 Subject: [PATCH] Added social discussions to store page --- apps/CPlanet/widget/CPlanet/Group/Index.jsx | 6 ++++-- .../App/ContractProfilePage/Discussions.jsx | 12 ++++++++++++ .../Mintbase/App/ContractProfilePage/Index.jsx | 13 +++++++++++++ 3 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 apps/Mintbase/widget/Mintbase/App/ContractProfilePage/Discussions.jsx diff --git a/apps/CPlanet/widget/CPlanet/Group/Index.jsx b/apps/CPlanet/widget/CPlanet/Group/Index.jsx index 2e4ee282..a423025a 100644 --- a/apps/CPlanet/widget/CPlanet/Group/Index.jsx +++ b/apps/CPlanet/widget/CPlanet/Group/Index.jsx @@ -33,7 +33,9 @@ if (!data.ok || !nftMetadata) { const owners = data.body.data.mb_views_nft_tokens.map((o) => o.owner); const isMember = owners.includes(context.accountId); -const Wrapper = styled.div``; +const Wrapper = styled.div` + width: 100%; +`; const indexKey = `nft:${groupId}`; @@ -54,7 +56,7 @@ return ( ) : ( ))} diff --git a/apps/Mintbase/widget/Mintbase/App/ContractProfilePage/Discussions.jsx b/apps/Mintbase/widget/Mintbase/App/ContractProfilePage/Discussions.jsx new file mode 100644 index 00000000..8b910f5d --- /dev/null +++ b/apps/Mintbase/widget/Mintbase/App/ContractProfilePage/Discussions.jsx @@ -0,0 +1,12 @@ +const Discussions = ({ isDarkModeOn, communityAddress }) => { + return ( + <> + + + ); +}; +return { Discussions }; diff --git a/apps/Mintbase/widget/Mintbase/App/ContractProfilePage/Index.jsx b/apps/Mintbase/widget/Mintbase/App/ContractProfilePage/Index.jsx index 08c0143c..4728f60f 100644 --- a/apps/Mintbase/widget/Mintbase/App/ContractProfilePage/Index.jsx +++ b/apps/Mintbase/widget/Mintbase/App/ContractProfilePage/Index.jsx @@ -10,6 +10,10 @@ const { MbInputField } = VM.require( ) || { MbInputField: () => <>, }; + +const { Discussions } = VM.require( + "${config_account}/widget/Mintbase.App.ContractProfilePage.Discussions" +) || { Discussions: () => <> }; const { getCombinedStoreData, checkStoreOwner, fetchStoreMinters } = VM.require( "${config_account}/widget/Mintbase.utils.sdk" ) || { @@ -25,6 +29,7 @@ const actualTabs = { tabLabels: [ { id: 0, title: "NFTs" }, { id: 1, title: "_About", hidden: !connectedUserIsMinter }, + { id: 2, title: "Discussions" }, // { id: 3, title: "_User Settings", hidden: !connectedUserIsMinter }, { id: 4, title: "Activity" }, { id: 5, title: "Analytics" }, @@ -298,6 +303,14 @@ const PageContent = () => {

About User

Nothing to show yet

); + case "discussions": + return ( + + ); case "contract-settings": return (