Skip to content

Commit

Permalink
Merge branch 'staging' into emc/chore/1639-integrate-swr-with-typesaf…
Browse files Browse the repository at this point in the history
…e-api-client
  • Loading branch information
0xemc authored Nov 16, 2023
2 parents 9ce0a4e + 787c54f commit 898ab6b
Show file tree
Hide file tree
Showing 44 changed files with 8,488 additions and 22,157 deletions.
288 changes: 1 addition & 287 deletions app/locale/de/messages.po

Large diffs are not rendered by default.

1,602 changes: 655 additions & 947 deletions app/locale/en-pseudo/messages.po

Large diffs are not rendered by default.

2,036 changes: 875 additions & 1,161 deletions app/locale/en/messages.po

Large diffs are not rendered by default.

288 changes: 1 addition & 287 deletions app/locale/es/messages.po

Large diffs are not rendered by default.

288 changes: 1 addition & 287 deletions app/locale/fr/messages.po

Large diffs are not rendered by default.

288 changes: 1 addition & 287 deletions app/locale/hi/messages.po

Large diffs are not rendered by default.

288 changes: 1 addition & 287 deletions app/locale/ko/messages.po

Large diffs are not rendered by default.

288 changes: 1 addition & 287 deletions app/locale/ru/messages.po

Large diffs are not rendered by default.

288 changes: 1 addition & 287 deletions app/locale/zh-CN/messages.po

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions carbon/app/[locale]/token-details/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ export default async function TokenDetailsPage(props: LocalizedPageProps) {
title={title()}
tabs={[
{
key: "c3",
label: t`C3`,
key: "toucan",
label: t`Toucan`,
optionsList: [
getC3PoolsOptions(),
getToucanPoolsOptions(),
getDateFilteringOptions(),
getPoolStatusOptions(),
],
contents: c3Contents,
contents: toucanContents,
},
{
key: "moss",
Expand All @@ -90,14 +90,14 @@ export default async function TokenDetailsPage(props: LocalizedPageProps) {
contents: mossContents,
},
{
key: "toucan",
label: t`Toucan`,
key: "c3",
label: t`C3`,
optionsList: [
getToucanPoolsOptions(),
getC3PoolsOptions(),
getDateFilteringOptions(),
getPoolStatusOptions(),
],
contents: toucanContents,
contents: c3Contents,
},
]}
/>
Expand Down
18 changes: 18 additions & 0 deletions carbon/components/ExploreMarketplaceButton/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { urls } from "@klimadao/lib/constants";
import { t } from "@lingui/macro";
import { Button } from "@mui/material";
import Link from "components/Link";
import { FC } from "react";
import styles from "./styles.module.scss";

export const ExploreMarketplaceButton: FC<{ className?: string }> = ({
className = "",
}) => {
return (
<Link href={urls.marketplace}>
<Button className={`${styles.exploreMarketplaceButton} ${className}`}>
{t`Explore Marketplace`}
</Button>
</Link>
);
};
15 changes: 15 additions & 0 deletions carbon/components/ExploreMarketplaceButton/styles.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.exploreMarketplaceButton {
white-space: nowrap;
font-size: 1.4rem;
padding: 0 2.4rem;
height: 4.8rem;
color: var(--brand-black);
background-color: var(--brand-green);
border-radius: 4rem;
font-family: Poppins;
font-weight: 600;

&:hover {
background-color: var(--brand-green);
}
}
14 changes: 10 additions & 4 deletions carbon/components/Layout/MobileMenuButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import ClearIcon from "@mui/icons-material/Clear";
import MenuIcon from "@mui/icons-material/Menu";
import { Button, Drawer } from "@mui/material";
import { ExploreMarketplaceButton } from "components/ExploreMarketplaceButton";
import { useState } from "react";
import { navItems } from "../NavItems";
import layoutStyles from "../styles.module.scss";
Expand All @@ -22,10 +23,15 @@ export function MobileMenuButton() {
</Button>
<Drawer anchor="bottom" open={showDrawer} onClick={toggleDrawer}>
<div className={styles.wrapper}>
<div className={styles.links}>
{navItems().map((navItem) => (
<MobileMenuButtonItem key={navItem.url} navItem={navItem} />
))}
<div className={styles.content}>
<div className={styles.links}>
{navItems().map((navItem) => (
<MobileMenuButtonItem key={navItem.url} navItem={navItem} />
))}
</div>
<ExploreMarketplaceButton
className={styles.exploreMarketplaceButton}
/>
</div>
</div>
</Drawer>
Expand Down
20 changes: 18 additions & 2 deletions carbon/components/Layout/MobileMenuButton/styles.module.scss
Original file line number Diff line number Diff line change
@@ -1,16 +1,32 @@
.wrapper {
padding-top: 6.4rem;
height: 100vh;
height: 100dvh;
display: flex;
flex-direction: column;
pointer-events: all;
}

.exploreMarketplaceButton {
width: 100%;
}

.content {
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
background-color: var(--brand-white);
padding: 0 1.6rem;
padding-top: 4rem;
padding-bottom: 7.2rem;
}

.links {
flex: 1;
display: flex;
flex-direction: column;
gap: 0.8rem;
padding: 1.2rem 2.4rem;
background-color: var(--brand-white);
}

.button {
Expand Down
10 changes: 2 additions & 8 deletions carbon/components/PageHeader/PageHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { urls } from "@klimadao/lib/constants";
import { t } from "@lingui/macro";
import { Button } from "@mui/material";
import { ExploreMarketplaceButton } from "components/ExploreMarketplaceButton";
import { ChangeLanguageButton } from "components/Layout/ChangeLanguageButton";
import Link from "components/Link";
import { FC } from "react";
Expand Down Expand Up @@ -32,11 +30,7 @@ export const PageHeader: FC<{
<div className={layout.desktopOnly}>
<div className={styles.buttons}>
<ChangeLanguageButton />
<Link href={urls.marketplace}>
<Button className={styles.exploreButton}>
{t`Explore Marketplace`}
</Button>
</Link>
<ExploreMarketplaceButton />
</div>
</div>
</div>
Expand Down
16 changes: 0 additions & 16 deletions carbon/components/PageHeader/styles.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,3 @@
gap: 1.2rem;
}
}

.exploreButton {
white-space: nowrap;
font-size: 1.4rem;
padding: 0 2.4rem;
height: 4.8rem;
color: var(--brand-black);
background-color: var(--brand-green);
border-radius: 4rem;
font-family: Poppins;
font-weight: 600;

&:hover {
background-color: var(--brand-green);
}
}
4 changes: 3 additions & 1 deletion carbon/lib/tokens.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ export async function getTokenSelectiveFeeDescription(token: Token) {

if (tokenInfo.fee_redeem_factor == 0)
return t`There is no selective redemption/retirement functionality for ${tokenInfo.name}.`;
return t`This cost includes the asset spot price + the ${tokenInfo.fee_redeem_factor.toFixed(
return t`This cost includes the asset spot price + the ${(
tokenInfo.fee_redeem_factor * 100
).toFixed(
2
)}% fee to selectively redeem or retire an underlying carbon project charged by ${
tokenInfo.bridge
Expand Down
Loading

0 comments on commit 898ab6b

Please sign in to comment.