Skip to content

Commit

Permalink
chore: disable deposit & borrow and add notice for kashi
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewlilley committed Dec 5, 2022
1 parent 0b1f7bb commit 1f76cee
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
11 changes: 11 additions & 0 deletions src/components/Header/Desktop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,17 @@ const Desktop: FC = () => {
</div>
</Container>
</nav>
<div className="relative bg-indigo-600">
<div className="px-3 py-3 mx-auto max-w-7xl sm:px-6 lg:px-8">
<div className="pr-16 sm:px-16 sm:text-center">
<p className="font-medium text-white">
<span className="hidden md:inline">
Kashi 1.0 is being depreciated. Deposits and Borrows are disabled in the UI.
</span>
</p>
</div>
</div>
</div>
</header>
<div style={{ height: HEADER_HEIGHT + 48, minHeight: HEADER_HEIGHT }} />
</>
Expand Down
6 changes: 1 addition & 5 deletions src/components/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@ import Desktop from './Desktop'
const Header: FC = () => {
const isDesktop = useDesktopMediaQuery()

return (
<>
{isDesktop ? <Desktop /> : <Mobile />}
</>
)
return <>{isDesktop ? <Desktop /> : <Mobile />}</>
}

export default Header
23 changes: 8 additions & 15 deletions src/features/kashi/KashiMarket/KashiMarket.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
import { t } from '@lingui/macro'
import { useLingui } from '@lingui/react'
import QuestionHelper from 'app/components/QuestionHelper'
import ToggleButtonGroup from 'app/components/ToggleButton'
import Typography from 'app/components/Typography'
import {
KashiMarketBorrowView,
KashiMarketDepositView,
KashiMarketRepayView,
KashiMarketWithdrawView,
} from 'app/features/kashi/KashiMarket'
import { KashiMarketRepayView, KashiMarketWithdrawView } from 'app/features/kashi/KashiMarket'
import { SwapLayoutCard } from 'app/layouts/SwapLayout'
import { useRouter } from 'next/router'
import React, { FC, useState } from 'react'
Expand All @@ -26,7 +19,7 @@ export const KashiMarket: FC<KashiMarketProps> = () => {
const { i18n } = useLingui()
const router = useRouter()

const [view, setView] = useState((router.query.view as string) || KashiMarketView.BORROW)
const [view, setView] = useState((router.query.view as string) || KashiMarketView.REPAY)

return (
<SwapLayoutCard>
Expand All @@ -38,7 +31,7 @@ export const KashiMarket: FC<KashiMarketProps> = () => {
variant="filled"
className="flex flex-grow bg-dark-800"
>
<ToggleButtonGroup.Button value={KashiMarketView.BORROW}>
{/* <ToggleButtonGroup.Button value={KashiMarketView.BORROW}>
{i18n._(t`Borrow`)}
<QuestionHelper
gap={false}
Expand All @@ -53,9 +46,9 @@ export const KashiMarket: FC<KashiMarketProps> = () => {
</div>
}
/>
</ToggleButtonGroup.Button>
</ToggleButtonGroup.Button> */}
<ToggleButtonGroup.Button value={KashiMarketView.REPAY}>{i18n._(t`Repay`)}</ToggleButtonGroup.Button>
<ToggleButtonGroup.Button value={KashiMarketView.DEPOSIT}>
{/* <ToggleButtonGroup.Button value={KashiMarketView.DEPOSIT}>
{i18n._(t`Deposit`)}
<QuestionHelper
gap={false}
Expand All @@ -70,12 +63,12 @@ export const KashiMarket: FC<KashiMarketProps> = () => {
</div>
}
/>
</ToggleButtonGroup.Button>
</ToggleButtonGroup.Button> */}
<ToggleButtonGroup.Button value={KashiMarketView.WITHDRAW}>{i18n._(t`Withdraw`)}</ToggleButtonGroup.Button>
</ToggleButtonGroup>
{view === KashiMarketView.BORROW && <KashiMarketBorrowView />}
{/* {view === KashiMarketView.BORROW && <KashiMarketBorrowView />} */}
{view === KashiMarketView.REPAY && <KashiMarketRepayView />}
{view === KashiMarketView.DEPOSIT && <KashiMarketDepositView />}
{/* {view === KashiMarketView.DEPOSIT && <KashiMarketDepositView />} */}
{view === KashiMarketView.WITHDRAW && <KashiMarketWithdrawView />}
</div>
</SwapLayoutCard>
Expand Down

1 comment on commit 1f76cee

@vercel
Copy link

@vercel vercel bot commented on 1f76cee Dec 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.