Skip to content

Commit

Permalink
Merge pull request #630 from threshold-network/feature/new-tbtc-app-m…
Browse files Browse the repository at this point in the history
…odal-refinements

New tBTC app modal refinements

Added "How it works" button for `NewTBTCApp` modal component. Reordered sub navigation links. Changed default page for tBTC section.
  • Loading branch information
michalsmiarowski authored Oct 30, 2023
2 parents 50f2a42 + 17d2374 commit 90b33fb
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 18 deletions.
20 changes: 15 additions & 5 deletions src/components/Modal/tBTC/NewTBTCApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,19 @@ import {
Flex,
Image,
} from "@threshold-network/components"
import { TakeNoteList } from "../../tBTC"
import withBaseModal from "../withBaseModal"
import tbtcAppBannerIllustration from "../../../static/images/tBTCAppBannerWithGrid.svg"
import { useTBTCTerms } from "../../../hooks/useTBTCTerms"
import tbtcAppBannerIllustration from "../../../static/images/tBTCAppBannerWithGrid.svg"
import { BaseModalProps } from "../../../types"
import ButtonLink from "../../ButtonLink"
import { TakeNoteList } from "../../tBTC"
import withBaseModal from "../withBaseModal"

const NewTBTCAppBase: FC<BaseModalProps> = ({ closeModal }) => {
const { accept } = useTBTCTerms()

return (
<>
<ModalHeader></ModalHeader>
<ModalHeader />
<ModalBody>
<Image
src={tbtcAppBannerIllustration}
Expand All @@ -43,7 +44,16 @@ const NewTBTCAppBase: FC<BaseModalProps> = ({ closeModal }) => {
</BodySm>
<Divider mt="2" />
</ModalBody>
<ModalFooter>
<ModalFooter gap="4">
<ButtonLink
variant="outline"
to="/tBTC/how-it-works"
onClick={() => {
closeModal()
}}
>
How it Works
</ButtonLink>
<Button
onClick={() => {
accept()
Expand Down
2 changes: 1 addition & 1 deletion src/components/Sidebar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const Sidebar = () => {
text: "tBTC",
activeIcon: tBTCFill,
passiveIcon: tBTCOutline,
href: "/tBTC",
href: "/tBTC/how-it-works",
} as NavItemDetail)
}

Expand Down
11 changes: 0 additions & 11 deletions src/components/tBTC/TakeNoteList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,6 @@ export const TakeNoteList: FC<{ size?: "sm" | "md" }> = ({ size = "md" }) => {
</ListItemWithIcon>
</List>
</ListItem>
<ListItem>
<LabelComponent mb="2">Bridging back btc is LIVE</LabelComponent>
<List spacing="2">
<ListItemWithIcon>
<BodyComponent>
You can bridge your BTC back whenever you want. Redemptions are
now live.
</BodyComponent>
</ListItemWithIcon>
</List>
</ListItem>
</List>
)
}
2 changes: 1 addition & 1 deletion src/pages/tBTC/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const MainTBTCPage: PageComponent = (props) => {
MainTBTCPage.route = {
path: "tBTC",
index: false,
pages: [TBTCBridge, HowItWorksPage, ExplorerPage],
pages: [HowItWorksPage, TBTCBridge, ExplorerPage],
title: "tBTC",
isPageEnabled: featureFlags.TBTC_V2,
}
Expand Down

0 comments on commit 90b33fb

Please sign in to comment.