Skip to content

Commit

Permalink
Merge branch 'main' of github.com:centrifuge/apps into default-provider
Browse files Browse the repository at this point in the history
  • Loading branch information
sophialittlejohn committed Sep 5, 2024
2 parents bb8c0cf + 52898be commit 2566ad7
Show file tree
Hide file tree
Showing 82 changed files with 774 additions and 954 deletions.
2 changes: 1 addition & 1 deletion centrifuge-app/.env-config/.env.ff-prod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ REACT_APP_ONBOARDING_API_URL=https://europe-central2-centrifuge-production-x.clo
REACT_APP_PINNING_API_URL=https://europe-central2-centrifuge-production-x.cloudfunctions.net/pinning-api-production
REACT_APP_POOL_CREATION_TYPE=propose
REACT_APP_RELAY_WSS_URL=wss://rpc.polkadot.io
REACT_APP_SUBQUERY_URL=https://api.subquery.network/sq/centrifuge/pools-multichain
REACT_APP_SUBQUERY_URL=https://subql.embrio.tech
REACT_APP_SUBSCAN_URL=https://centrifuge.subscan.io
REACT_APP_TINLAKE_NETWORK=mainnet
REACT_APP_INFURA_KEY=8ed99a9a115349bbbc01dcf3a24edc96
Expand Down
2 changes: 1 addition & 1 deletion centrifuge-app/.env-config/.env.production
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ REACT_APP_ONBOARDING_API_URL=https://europe-central2-centrifuge-production-x.clo
REACT_APP_PINNING_API_URL=https://europe-central2-centrifuge-production-x.cloudfunctions.net/pinning-api-production
REACT_APP_POOL_CREATION_TYPE=propose
REACT_APP_RELAY_WSS_URL=wss://rpc.polkadot.io
REACT_APP_SUBQUERY_URL=https://api.subquery.network/sq/centrifuge/pools-multichain
REACT_APP_SUBQUERY_URL=https://subql.embrio.tech
REACT_APP_SUBSCAN_URL=https://centrifuge.subscan.io
REACT_APP_TINLAKE_NETWORK=mainnet
REACT_APP_INFURA_KEY=8ed99a9a115349bbbc01dcf3a24edc96
Expand Down
98 changes: 0 additions & 98 deletions centrifuge-app/src/components/CardTotalValueLocked.tsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function PoolPerformanceChart() {
}
return { day: new Date(day.timestamp), nav: Number(nav), price: Number(price) }
}) || [],
[isSingleTranche, truncatedPoolStates]
[isSingleTranche, truncatedPoolStates, todayAssetValue, todayPrice]
)

const today = {
Expand Down
6 changes: 0 additions & 6 deletions centrifuge-app/src/components/DebugFlags/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ export type Key =
| 'persistDebugFlags'
| 'showUnusedFlags'
| 'allowInvestBelowMin'
| 'alternativeTheme'
| 'editPoolConfig'
| 'editPoolVisibility'
| 'showAdvancedAccounts'
Expand All @@ -59,11 +58,6 @@ export const flagsConfig = {
default: false,
type: 'checkbox',
},
alternativeTheme: {
alwaysShow: true,
default: false,
type: 'checkbox',
},
convertAddress: {
Component: ConvertAddressDialogWithButton,
alwaysShow: true,
Expand Down
4 changes: 2 additions & 2 deletions centrifuge-app/src/components/DemoBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ export const DemoBanner = () => {
isOpen={isOpen}
onClose={() => onClose()}
title={
<Text as="h3" color="textInverted" variant="heading4">
<Text as="h3" color="white" variant="heading4">
Welcome to the demo environment of the Centrifuge App. All data and wallet transactions are not real as this
is purely a testing environment. Read{' '}
<Text
target="_blank"
as="a"
href="https://centrifuge.hackmd.io/@Anna/H1ylqpRQj"
color="textInverted"
color="white"
variant="heading4"
display="inline"
textDecoration="underline"
Expand Down
15 changes: 7 additions & 8 deletions centrifuge-app/src/components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,38 +1,37 @@
import { Stack, Text } from '@centrifuge/fabric'
import * as React from 'react'
import styled, { useTheme } from 'styled-components'
import styled from 'styled-components'
import { InvestmentDisclaimerDialog } from './Dialogs/InvestmentDisclaimerDialog'

export const Footer = () => {
const theme = useTheme()
const [isDialogOpen, setIsDialogOpen] = React.useState(false)

return (
<>
<InvestmentDisclaimerDialog open={isDialogOpen} onClose={() => setIsDialogOpen(false)} />
<Stack as="footer" px={2} py="12px" gap={1} width="100%" background={theme.colors.backgroundPrimary}>
<Stack as="footer" gap={1} width="100%">
<UnstyledLink href="mailto:[email protected]">
<Text textOverflow="ellipsis" variant="body4">
<Text textOverflow="ellipsis" variant="body4" color="textInverted">
Need help?
</Text>
</UnstyledLink>
<UnstyledLink href="https://docs.centrifuge.io/">
<Text textOverflow="ellipsis" variant="body4">
<Text textOverflow="ellipsis" variant="body4" color="textInverted">
Documentation
</Text>
</UnstyledLink>
<UntyledButton onClick={() => setIsDialogOpen(true)}>
<Text textOverflow="ellipsis" variant="body4">
<Text textOverflow="ellipsis" variant="body4" color="textInverted">
Investment disclaimer
</Text>
</UntyledButton>
<UnstyledLink target="_blank" href="https://centrifuge.io/data-privacy-policy/">
<Text textOverflow="ellipsis" variant="body4">
<Text textOverflow="ellipsis" variant="body4" color="textInverted">
Data privacy policy
</Text>
</UnstyledLink>
<UnstyledLink target="_blank" href="https://centrifuge.io/imprint/">
<Text textOverflow="ellipsis" variant="body4">
<Text textOverflow="ellipsis" variant="body4" color="textInverted">
Imprint
</Text>
</UnstyledLink>
Expand Down
2 changes: 1 addition & 1 deletion centrifuge-app/src/components/LayoutBase/LayoutSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type Props = {

export function LayoutSection({ title, titleAddition, subtitle, headerRight, children, ...boxProps }: Props) {
return (
<BasePadding as="section" gap={2} {...boxProps}>
<BasePadding as="section" gap={2} pt={20} pb={20} {...boxProps}>
{(title || titleAddition || subtitle || headerRight) && (
<Shelf justifyContent="space-between" as="header" maxWidth="mainContent">
<Stack>
Expand Down
45 changes: 15 additions & 30 deletions centrifuge-app/src/components/LayoutBase/index.tsx
Original file line number Diff line number Diff line change
@@ -1,66 +1,51 @@
import { WalletMenu } from '@centrifuge/centrifuge-react'
import { Stack, Text } from '@centrifuge/fabric'
import * as React from 'react'
import { Outlet } from 'react-router'
import { useIsAboveBreakpoint } from '../../utils/useIsAboveBreakpoint'
import { Footer } from '../Footer'
import { LoadBoundary } from '../LoadBoundary'
import { LogoLink } from '../LogoLink'
import { LogoLink } from '../LogoLink-deprecated'
import { Menu } from '../Menu'
import { BasePadding } from './BasePadding'
import {
ContentWrapper,
FooterContainer,
HeaderBackground,
Inner,
LogoContainer,
MainContainer,
Root,
ToolbarContainer,
WalletContainer,
WalletInner,
WalletPositioner,
} from './styles'

type LayoutBaseProps = {
children?: React.ReactNode
gap?: number | number[]
}

export function LayoutBase({ children, gap }: LayoutBaseProps) {
export function LayoutBase(): JSX.Element {
const isMedium = useIsAboveBreakpoint('M')

return (
<Root>
<WalletContainer>
<WalletPositioner>
<WalletInner>
<WalletMenu />
</WalletInner>
</WalletPositioner>
</WalletContainer>
<Inner>
<HeaderBackground />

<LogoContainer>
<LogoLink />
<LogoLink></LogoLink>
</LogoContainer>

<WalletContainer px={[2, 2, 3, 3, 5]}>
<WalletPositioner>
<WalletInner minWidth={[200, 264]}>
<WalletMenu />
</WalletInner>
</WalletPositioner>
</WalletContainer>

<ToolbarContainer as="aside">
<Menu />
</ToolbarContainer>

<LoadBoundary>
<MainContainer as="main" gap={gap}>
{children}
</MainContainer>
</LoadBoundary>

{isMedium && (
<FooterContainer>
<Footer />
</FooterContainer>
)}
</Inner>
<ContentWrapper>
<Outlet />
</ContentWrapper>
</Root>
)
}
Expand Down
Loading

0 comments on commit 2566ad7

Please sign in to comment.