Skip to content

Commit

Permalink
Merge pull request #424 from GenaDrop/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
Jikugodwill authored Sep 27, 2024
2 parents 03c5981 + d0d4cc0 commit d3d5242
Show file tree
Hide file tree
Showing 10 changed files with 259 additions and 233 deletions.
30 changes: 15 additions & 15 deletions apps/Mintbase/widget/Mintbase/App/ContractProfilePage/Analytics.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const darkColors = {
sideBar_color: "#fff",
},
footer: {
titlenelowBackground: "#806ce1",
titlenelowBackground: "var(--blue-300, #4f58a3)",
titleBackground: "#fff",
fromBackground: "rgb(55,72,107)",
toBackground: "rgb(55,72,107)",
Expand All @@ -31,7 +31,7 @@ const darkColors = {
color2brand: "rgb(210, 202, 250)",
colordescription: "rgb(210, 202, 250)",
background:
"radial-gradient(circle, rgb(49,62,89) 0%, rgba(230,230,231,0.01) 0%, rgb(49,62,89) 100%, rgb(49,62,89) 100%, rgb(49,62,89) 100%, rgba(46,52,90,1) 100%);",
"radial-gradient(circle, #313e59 0%, rgba(230,230,231,0.01) 0%, rgb(49,62,89) 100%, rgb(49,62,89) 100%, rgb(49,62,89) 100%, rgba(46,52,90,1) 100%);",
},
search_sbt: {
section_bg: "transparent",
Expand All @@ -55,19 +55,19 @@ const darkColors = {
sbt_info: {
section_bg: "transparent",
card_bg: "rgb(49, 62, 89)",
card_title_color: "#806ce1",
card_title_color: "var(--blue-300, #4f58a3)",
card_content_color: "#fff",
},
tab_sbt: {
backgroundColor: "rgb(49,62,89)",
textColor: "#fff",
headerColor: "#806ce1",
headerColor: "var(--blue-300, #4f58a3)",
numberColor: "#fff",
},
sbt_area: {
section_bg: "transparent",
card_bg: "rgb(49, 62, 89)",
card_title_color: "#806ce1",
card_title_color: "var(--blue-300, #4f58a3)",
},
table_pagination: {
table_bg: "rgb(49,62,89)",
Expand Down Expand Up @@ -131,17 +131,17 @@ const lightColors = {
sideBar_color: "#fff",
},
footer: {
titlenelowBackground: "#806ce1",
titlenelowBackground: "var(--blue-300, #4f58a3)",
titleBackground: "#fff",
fromBackground: "rgb(210, 202, 250)",
toBackground: "rgb(210, 202, 250)",
belowBackground: "#806ce1",
belowBackground: "var(--blue-300, #4f58a3)",
},
dynamic_header: {
afterbrandcolor: "#789efb",
color1brand: "#000",
color2brand: "#806ce1",
colordescription: "#806ce1",
color2brand: "var(--blue-300, #4f58a3)",
colordescription: "var(--blue-300, #4f58a3)",
background:
"radial-gradient(circle, rgba(210,202,250,1) 0%, rgba(230,230,231,0.01) 0%, rgba(235,238,255,1) 100%, rgba(235,231,253,1) 100%, rgba(255,241,241,1) 100%, rgba(46,52,90,1) 100%);",
},
Expand All @@ -167,19 +167,19 @@ const lightColors = {
sbt_info: {
section_bg: "rgb(235, 231, 253)",
card_bg: "rgb(255, 255, 255)",
card_title_color: "#806ce1",
card_title_color: "var(--blue-300, #4f58a3)",
card_content_color: "#000",
},
tab_sbt: {
backgroundColor: "rgb(210, 202, 250)",
textColor: "#fff",
headerColor: "#806ce1",
headerColor: "var(--blue-300, #4f58a3)",
numberColor: "#fff",
},
sbt_area: {
section_bg: "rgb(235, 231, 253)",
card_bg: "rgb(255, 255, 255)",
card_title_color: "#806ce1",
card_title_color: "var(--blue-300, #4f58a3)",
},
table_pagination: {
table_bg: "rgb(255,255,255)",
Expand All @@ -191,7 +191,7 @@ const lightColors = {
table_hover_color: "rgb(0,0,0)",
table_hover_bg: "",
btn_border: "#000",
btn_border: "#806ce1",
btn_border: "var(--blue-300, #4f58a3)",
btn_bg: "#fff",
btn_bg_active: "rgb(235, 231, 253)",
btn_color: "#000",
Expand All @@ -200,9 +200,9 @@ const lightColors = {
textColor: "rgb(0,0,0)",
},
piePercentage: {
text: "#8e67e8",
text: "var(--purple-300, #8c4fe5",
filled: "#391b86",
empty: "#8e67e8",
empty: "var(--purple-300, #8c4fe5",
},
chart: {
title: "rgba(0,0,0,1)",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
const { Pagination } = VM.require("buildhub.near/widget/components") || {
Pagination: () => <></>,
};

const { getStoreNFTs } = VM.require(
"${config_account}/widget/Mintbase.utils.sdk"
);
Expand Down Expand Up @@ -49,16 +45,13 @@ const ContractNFTs = ({ contractId, isDarkModeOn, showFilters }) => {
})
.then(({ results, totalRecords, errors }) => {
if (errors) {
// handle those errors like a pro
console.error(errors);
}
// do something great with this precious data
setCountNFTs(totalRecords);
setLoading(false);
setNftData(results);
})
.catch((error) => {
// handle errors from fetch itself
console.error(error);
});
}, [limit, offset, pageNumber, showListed, showOwnedByMe]);
Expand Down Expand Up @@ -86,7 +79,9 @@ const ContractNFTs = ({ contractId, isDarkModeOn, showFilters }) => {
text-transform: uppercase;
font-weight: 400;
font-size: 16px;
color: ${isDarkModeOn ? "#B3B5BD" : "#525c76"};
color: var(
${isDarkModeOn ? "--gray-300, #b3b5bd" : "--gray-600, #5b5d6b"}
);
}
.pagination_container {
width: 100%;
Expand All @@ -98,7 +93,9 @@ const ContractNFTs = ({ contractId, isDarkModeOn, showFilters }) => {
`;

const LeftFilter = styled.div`
background: ${isDarkModeOn ? "rgba(30, 32, 48, 1)" : "#fff"};
background: var(
${isDarkModeOn ? "--gray-850, #1e2030" : "--gray-50, #f9f9f9"}
);
width: 22%;
height: 100%;
padding: 15px;
Expand Down
50 changes: 26 additions & 24 deletions apps/Mintbase/widget/Mintbase/App/ContractProfilePage/Index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ const handleTabClick = (index) => {
const Card = styled.div`
width: 100%;
border-radius: 0;
background-color: #f9fafb;
color: black;
background-color: var(--gray-50, #f9f9f9);
color: var(--mb-black, #000);
&.dark {
color: white;
color: var(--mb-white, #fff);
}
.content_main {
padding: 24px 48px;
Expand All @@ -81,17 +81,17 @@ const Card = styled.div`

const ImageSection = styled.div`
height: 254px;
background: #eceef0;
background: var(--gray-150, #e8eaf0);
position: relative;
width: 100%;
img {
width: 126px;
height: 126px;
position: absolute;
bottom: -24px;
border: 4px solid ${isDarkModeOn ? "#1e2030" : "#fff"};
border: 4px solid var(${isDarkModeOn ? "--gray-850, #1e2030" : "--mb-white, #fff"});
left: 48px;
background: #aa4747;
background: var(--error-300, #c74c4c);
z-index: 1;
margin: 0 auto;
@media (max-width: 768px) {
Expand Down Expand Up @@ -128,11 +128,11 @@ const TopContent = styled.div`
gap: 20px;
button {
background: transparent;
color: ${(props) => (props.isDarkModeOn ? "#fff" : "#000")};
border: 1px solid #ba5c60;
color: var(${props.isDarkModeOn ? "--mb-whitee, #fff" : "--mb-black, #000"});
border: 1px solid var(--error-300, #c74c4c);
:hover {
background: #ba5c60;
color: #fff;
background: var(--error-300, #c74c4c);
color: var(--mb-white,#fff);
}
}
p {
Expand All @@ -155,11 +155,11 @@ const Details = styled.div`
align-items: flex-start;
border-radius: 4px;
padding: 10px;
background: ${isDarkModeOn ? "#282A3A" : "#f9f9f9"};
background: var(${isDarkModeOn ? "--gray-800, #282A3A" : "--gay-50, #f9f9f9"});
span {
font-size: 12px;
font-weight: 500;
color: ${isDarkModeOn ? "#B3B5BD" : "#404252"};
color: var(${isDarkModeOn ? "--gray-300, #B3B5BD" : "--gray-700, #404252"});
}
p {
font-size: 14px;
Expand All @@ -185,12 +185,12 @@ const Profiles = styled.div`
font-size: 12px;
padding: 4px 6px;
border-radius: 4px;
border: 1px solid #b0b0b0;
border: 1px solid var(--gray-300, #b3b5bd);
i {
color: ${isDarkModeOn ? "#fff" : "#000"} !important;
color: var(${isDarkModeOn ? "--mb-white, #fff" : "--mb-black, #000"}) !important;
}
span {
color: ${isDarkModeOn ? "#fff" : "#000"};
color: var(${isDarkModeOn ? "--mb-white, #fff" : "--mb-black, #000"});
}
}
}
Expand All @@ -204,7 +204,7 @@ const queryInListedToggleHandler = () => {
};

const AboutOwner = styled.div`
background: ${isDarkModeOn ? "#1E2030" : "#FFF"};
background: var(${isDarkModeOn ? "--gray-900, #1E2030" : "--mb-white, #FFF"});
overflow: hidden;
.owner-details-main {
margin-left: 48px;
Expand All @@ -225,8 +225,14 @@ const AboutOwner = styled.div`
text-transform: uppercase;
gap: 0.2rem;
border-radius: 0.25rem; /* Assuming default border radius */
color: ${isDarkModeOn ? "#9FED8F" : "#0A7D6C"}; /* Ternary for text color */
background-color: ${isDarkModeOn ? "#9FED8F33" : "#0A7D6C1A"};
color: var(
${isDarkModeOn ? "--success-100, #9FED8F" : "--success-300, #0A7D6C"}
); /* Ternary for text color */
background-color: var(
${isDarkModeOn
? "--mb-green-shade-dark, #9FED8F33"
: "--mb-green-shade-light, #0A7D6C1A"}
);
padding: 6px;
font-weight: 700;
font-size: 12px;
Expand All @@ -243,7 +249,6 @@ const AboutOwner = styled.div`
}
`;
const createStoreHandler = () => {
// console.log("createStoreHandler");
setOpen(true);
};

Expand All @@ -252,7 +257,7 @@ useEffect(() => {
checkStoreOwner(accountId, context.accountId)
.then((data) => setIsStoreOwner(data))
.catch((error) => {
console.error("in contracts", error);
console.error(error);
});

accountId &&
Expand All @@ -261,21 +266,18 @@ useEffect(() => {
setIsMinter(data?.some((data) => data?.minter_id === context.accountId))
)
.catch((error) => {
console.error("in contracts", error);
console.error(error);
});

accountId &&
getCombinedStoreData({ id: accountId, limit, offset })
.then(({ data, errors }) => {
if (errors) {
// handle those errors like a pro
console.error(errors);
}
// do something great with this precious data
setStoreData(data);
})
.catch((error) => {
// handle errors from fetch itself
console.error(error);
});
accountId &&
Expand Down
Loading

0 comments on commit d3d5242

Please sign in to comment.