Skip to content

Commit

Permalink
NTT page fixed (#932)
Browse files Browse the repository at this point in the history
  • Loading branch information
giulianoconti authored Jan 31, 2025
1 parent 39dae9e commit 8c5e83a
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 16 deletions.
4 changes: 3 additions & 1 deletion src/pages/Analytics/NTT/NTTToken/RecentTransactions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,9 @@ export const RecentTransactions = ({
+data?.content?.payload?.nttMessage?.trimmedAmount?.amount / 1000000,
)}
</span>
<img src={tokenIcon} alt={`${data?.data?.symbol} Token`} width="16" height="16" />
{tokenIcon && (
<img src={tokenIcon} alt={`${data?.data?.symbol} Token`} width="16" height="16" />
)}
{data?.data?.usdAmount && (
<span className="usd">(${formatNumber(+data?.data?.usdAmount, 2)})</span>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Analytics/NTT/NTTToken/Summary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ const ContractsList = ({
summary: GetSummaryResult;
environment: Environment;
}) => {
const platforms = Object.entries(summary.platforms).filter(([chain]) =>
const platforms = Object.entries(summary?.platforms || {}).filter(([chain]) =>
[
"solana",
"ethereum",
Expand Down
17 changes: 12 additions & 5 deletions src/pages/PrivacyPolicy/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ const PrivacyPolicy = () => {
};
}, [activeSection]);

const handleShowContents = () => {
if (!isDesktop) {
setShowContentsMobile(!showContentsMobile);
}
};

return (
<BaseLayout showTopHeader={isDesktop}>
<div className="terms-of-use">
Expand Down Expand Up @@ -494,11 +500,12 @@ const PrivacyPolicy = () => {
</div>

<div className="terms-of-use-aside">
<div className={`terms-of-use-aside-container ${showContentsMobile ? "show" : ""}`}>
<h3
className="terms-of-use-aside-container-title"
onClick={() => setShowContentsMobile(!showContentsMobile)}
>
<div
className={`terms-of-use-aside-container ${
!isDesktop && showContentsMobile ? "show" : ""
}`}
>
<h3 className="terms-of-use-aside-container-title" onClick={handleShowContents}>
<span className="terms-of-use-aside-container-title-mobile">
{t(tableOfContents.find(item => item.id === activeSection)?.text) ||
t("privacyPolicy.header.list.title")}
Expand Down
17 changes: 12 additions & 5 deletions src/pages/TermsOfUse/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ const TermsOfUse = () => {
};
}, [activeSection]);

const handleShowContents = () => {
if (!isDesktop) {
setShowContentsMobile(!showContentsMobile);
}
};

return (
<BaseLayout showTopHeader={isDesktop}>
<div className="terms-of-use">
Expand Down Expand Up @@ -628,11 +634,12 @@ const TermsOfUse = () => {
</div>

<div className="terms-of-use-aside">
<div className={`terms-of-use-aside-container ${showContentsMobile ? "show" : ""}`}>
<h3
className="terms-of-use-aside-container-title"
onClick={() => setShowContentsMobile(!showContentsMobile)}
>
<div
className={`terms-of-use-aside-container ${
!isDesktop && showContentsMobile ? "show" : ""
}`}
>
<h3 className="terms-of-use-aside-container-title" onClick={handleShowContents}>
<span className="terms-of-use-aside-container-title-mobile">
{t(tableOfContents.find(item => item.id === activeSection)?.text) ||
t("termsOfUse.page.header.list.title")}
Expand Down
4 changes: 0 additions & 4 deletions src/pages/TermsOfUse/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,6 @@
justify-content: space-between;
max-height: calc(100svh - 49px);
padding: 24px 0;

@include desktop {
padding: 0;
}
}
}

Expand Down

0 comments on commit 8c5e83a

Please sign in to comment.