Skip to content

Commit 2432c3b

Browse files
added disclaimer to stablecoin page
1 parent 0b65ef8 commit 2432c3b

File tree

3 files changed

+39
-3
lines changed

3 files changed

+39
-3
lines changed

src/components/StablecoinBoxGrid.tsx

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import { useState } from "react"
22
import { useRouter } from "next/router"
33
import { useTranslation } from "next-i18next"
4-
import { Box, Flex, useColorModeValue } from "@chakra-ui/react"
4+
import { FaExclamation } from "react-icons/fa6"
5+
import { HiOutlineSpeakerphone } from "react-icons/hi";
6+
import { Box, Flex, HStack,Icon,Text,useColorModeValue } from "@chakra-ui/react"
57

68
import { ChildOnlyProp } from "@/lib/types"
79

@@ -39,6 +41,7 @@ interface ILink {
3941

4042
type GridItemProps = {
4143
description: string
44+
disclaimer: string
4245
columnNumber: number
4346
rowNumber: number
4447
emoji: string
@@ -65,6 +68,23 @@ const OpenTitle = ({ title }: { title: string }) => {
6568
)
6669
}
6770

71+
const Disclaimer = ({ disclaimer }: { disclaimer: string }) => {
72+
73+
return (
74+
<Box p={1} borderRadius={'5px'} bg={'warning'}>
75+
<HStack>
76+
<Icon as={HiOutlineSpeakerphone} />
77+
{/* <Icon fontWeight={300} fontSize={'sm'} as={FaExclamation} /> */}
78+
<Text fontSize="sm" fontWeight={400} >
79+
{disclaimer}
80+
</Text>
81+
</HStack>
82+
</Box>
83+
84+
)
85+
86+
}
87+
6888
const Title = ({ title }: { title: string }) => {
6989
return (
7090
<OldHeading
@@ -186,7 +206,18 @@ const GridItem = ({
186206
}}
187207
>
188208
{isOpen ? (
189-
<Emoji mb={8} text={emoji} fontSize="8xl" />
209+
<>
210+
<Box display={'flex'} alignItems={'center'} justifyContent={'space-between'} gap={48}>
211+
<Emoji mb={8} text={emoji} fontSize="8xl" />
212+
{title === t("page-stablecoins-algorithmic") && (
213+
214+
<Disclaimer disclaimer={t("page-stablecoins-algorithmic-disclaimer")} />
215+
216+
)}
217+
</Box>
218+
219+
220+
</>
190221
) : (
191222
<>
192223
<StyledEmoji emoji={emoji} />
@@ -196,7 +227,8 @@ const GridItem = ({
196227
<div>
197228
{isOpen && (
198229
<div>
199-
<OpenTitle title={title} />
230+
<OpenTitle title={title} />
231+
200232
<Body>{description}</Body>
201233
<Row>
202234
{pros && (
@@ -255,6 +287,7 @@ const GridItem = ({
255287

256288
export interface IPropsBoxItem {
257289
description: string
290+
disclaimer?: string
258291
emoji: string
259292
title: string
260293
pros?: Array<string>
@@ -299,6 +332,7 @@ const StablecoinBoxGrid = ({ items }: StablecoinBoxGridProps) => {
299332
title={item.title}
300333
emoji={item.emoji}
301334
description={item.description}
335+
disclaimer={item.disclaimer || ''}
302336
pros={item.pros}
303337
cons={item.cons}
304338
links={item.links}

src/intl/en/page-stablecoins.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
"page-stablecoins-algorithmic-con-1": "You need to trust (or be able to read) the algorithm.",
5757
"page-stablecoins-algorithmic-con-2": "Your balance of coins will change based on total supply.",
5858
"page-stablecoins-algorithmic-description": "These stablecoins aren't backed by any other asset. Instead an algorithm will sell tokens if the price falls below the desired value and supply tokens if the value goes beyond the desired amount. Because the number of these tokens in circulation changes regularly, the number of tokens you own will change, but will always reflect your share.",
59+
"page-stablecoins-algorithmic-disclaimer": "Algorithmic stablecoins are experimental technology. You should be aware of the risks before using them.",
5960
"page-stablecoins-algorithmic-pro-1": "No collateral needed.",
6061
"page-stablecoins-algorithmic-pro-2": "Controlled by a public algorithm.",
6162
"page-stablecoins-bank-apy": "0.05%",

src/pages/stablecoins.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ const StablecoinsPage = ({ markets, marketsHasError }) => {
291291
{
292292
title: t("page-stablecoins-algorithmic"),
293293
description: t("page-stablecoins-algorithmic-description"),
294+
disclaimer: t("page-stablecoins-algorithmic-disclaimer"),
294295
emoji: ":chart_with_downwards_trend:",
295296
pros: [
296297
t("page-stablecoins-algorithmic-pro-1"),

0 commit comments

Comments
 (0)