diff --git a/src/components/Earn/vault/VaultExpanded.tsx b/src/components/Earn/vault/VaultExpanded.tsx
index 749bc6f4..a0e88715 100644
--- a/src/components/Earn/vault/VaultExpanded.tsx
+++ b/src/components/Earn/vault/VaultExpanded.tsx
@@ -21,15 +21,6 @@ export default function VaultExpanded(props: Props) {
const [isConfirming, setIsConfirming] = useState(false)
const withdrawFromVaults = useStore((s) => s.withdrawFromVaults)
- function enterVaultHandler() {
- useStore.setState({
- vaultModal: {
- vault: props.row.original,
- selectedBorrowDenoms: [props.row.original.denoms.secondary],
- },
- })
- }
-
function depositMoreHandler() {
useStore.setState({
vaultModal: {
@@ -59,14 +50,6 @@ export default function VaultExpanded(props: Props) {
/* BUTTONS */
- function DepositButton() {
- return (
- }>
- Deposit
-
- )
- }
-
function DepositMoreButton() {
return (
}>
@@ -128,8 +111,7 @@ export default function VaultExpanded(props: Props) {
>
- {!status && }
-
+ {status && }
{status === VaultStatus.ACTIVE && }
{status === VaultStatus.UNLOCKING && }
{status === VaultStatus.UNLOCKED && }
diff --git a/src/components/Earn/vault/VaultRow.tsx b/src/components/Earn/vault/VaultRow.tsx
index 6c9fcfd4..db07ad67 100644
--- a/src/components/Earn/vault/VaultRow.tsx
+++ b/src/components/Earn/vault/VaultRow.tsx
@@ -7,20 +7,24 @@ type AssetRowProps = {
}
export const VaultRow = (props: AssetRowProps) => {
+ const vault = props.row.original as DepositedVault
return (
{
e.preventDefault()
+ if (!vault.status) return
const isExpanded = props.row.getIsExpanded()
props.resetExpanded()
!isExpanded && props.row.toggleExpanded()
}}
>
- {props.row.getVisibleCells().map((cell, index) => {
+ {props.row.getVisibleCells().map((cell) => {
return (
{flexRender(cell.column.columnDef.cell, cell.getContext())}
diff --git a/src/components/Earn/vault/VaultTable.tsx b/src/components/Earn/vault/VaultTable.tsx
index a3c191ec..5aef8265 100644
--- a/src/components/Earn/vault/VaultTable.tsx
+++ b/src/components/Earn/vault/VaultTable.tsx
@@ -10,6 +10,7 @@ import {
import classNames from 'classnames'
import React from 'react'
+import Button from 'components/Button'
import DisplayCurrency from 'components/DisplayCurrency'
import VaultExpanded from 'components/Earn/vault/VaultExpanded'
import VaultLogo from 'components/Earn/vault/VaultLogo'
@@ -61,20 +62,29 @@ export const VaultTable = (props: Props) => {
sub={vault.provider}
/>
{status === VaultStatus.UNLOCKING && (
-
-
-
-
- {produceCountdown(remainingTime)}
-
-
-
-
- Unlocking
-
-
-
-
+
+
+ Unlocking
+
+
+ {produceCountdown(remainingTime)}
+
+
)}
{status === VaultStatus.UNLOCKED && (
{
{
accessorKey: 'details',
enableSorting: false,
- header: 'Details',
+ header: (data) => {
+ const tableData = data.table.options.data as DepositedVault[]
+ if (tableData.length && tableData[0].status) return 'Details'
+ return 'Deposit'
+ },
cell: ({ row }) => {
+ function enterVaultHandler() {
+ useStore.setState({
+ vaultModal: {
+ vault: row.original,
+ selectedBorrowDenoms: [row.original.denoms.secondary],
+ },
+ })
+ }
+
if (props.isLoading) return
+ const vault = row.original as DepositedVault
return (
-
-
-
+ {vault.status ? (
+
+
+
+ ) : (
+
+ )}
)
},
diff --git a/tailwind.config.js b/tailwind.config.js
index f8caea9b..22ec4af1 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -1,23 +1,6 @@
/** @type {import('tailwindcss').Config} */
const plugin = require('tailwindcss/plugin')
-const flipClass = plugin(function ({ addUtilities }) {
- addUtilities({
- '.flip-x-180': {
- transform: 'rotateX(180deg)',
- },
- '.preserve-3d': {
- transformStyle: 'preserve-3d',
- },
- '.perspective': {
- perspective: '1000px',
- },
- '.backface-hidden': {
- backfaceVisibility: 'hidden',
- },
- })
-})
-
module.exports = {
content: ['./src/pages/**/*.{js,ts,jsx,tsx}', './src/components/**/*.{js,ts,jsx,tsx}'],
safelist: [
@@ -52,7 +35,6 @@ module.exports = {
fadein: 'fadein 1s ease-in-out forwards',
glow: 'glow 1000ms ease-in-out forwards',
progress: 'spin 1200ms cubic-bezier(0.5, 0, 0.5, 1) infinite',
- flip: 'flip 10s linear alternate-reverse infinite',
},
backdropBlur: {
sticky: '50px',
@@ -166,12 +148,6 @@ module.exports = {
'66%': { opacity: 1 },
'100%': { opacity: 0 },
},
- flip: {
- '0%': { transform: 'rotateX(0deg)' },
- '45%': { transform: 'rotateX(0deg)' },
- '55%': { transform: 'rotateX(180deg)' },
- '100%': { transform: 'rotateX(180deg)' },
- },
},
letterSpacing: {
normal: 0,
@@ -190,7 +166,7 @@ module.exports = {
content: '1024px',
modal: '895px',
'modal-sm': '517px',
- 'modal-xs': '442px'
+ 'modal-xs': '442px',
},
minWidth: {
15: '60px',
@@ -232,7 +208,6 @@ module.exports = {
},
},
plugins: [
- flipClass,
require('tailwind-scrollbar-hide'),
plugin(function ({ addBase, addUtilities, theme }) {
addBase({
| |