diff --git a/app/layout.tsx b/app/layout.tsx
index aa551e2..b3fc6c7 100644
--- a/app/layout.tsx
+++ b/app/layout.tsx
@@ -1,13 +1,6 @@
import type { Metadata } from 'next'
-import {
- Fira_Code,
- Space_Grotesk,
- Jost,
- Fira_Sans,
- Inter,
- Hanken_Grotesk
-} from 'next/font/google'
-import './globals.css'
+import { Hanken_Grotesk } from 'next/font/google'
+import '@/styles/globals.css'
const hankenGrotesk = Hanken_Grotesk({
subsets: ['latin'],
diff --git a/components/CalculationBaseOutput/CalculationBase.module.css b/components/CalculationBaseOutput/CalculationBase.module.css
index 6e571ca..74141a0 100644
--- a/components/CalculationBaseOutput/CalculationBase.module.css
+++ b/components/CalculationBaseOutput/CalculationBase.module.css
@@ -16,13 +16,7 @@
font-size: 0.9rem;
}
-.label {
- font-size: 0.65rem;
- color: rgba(var(--foreground-rgb), 0.6);
- border: 1px solid rgba(var(--foreground-rgb), 0.2);
- border-radius: var(--border-radius);
- padding: 0.1rem 0.3rem;
- margin-left: 0.2rem;
- margin-right: 0.2rem;
- vertical-align: middle;
+.calculationBase p {
+ display: flex;
+ align-items: center;
}
diff --git a/components/CalculationBaseOutput/CalculationBase.tsx b/components/CalculationBaseOutput/CalculationBase.tsx
index a781188..c1a5846 100644
--- a/components/CalculationBaseOutput/CalculationBase.tsx
+++ b/components/CalculationBaseOutput/CalculationBase.tsx
@@ -3,30 +3,37 @@
import { ratioOceanToAsi, ratioAgixToAsi, ratioFetToAsi } from '@/constants'
import styles from './CalculationBase.module.css'
import { usePrices } from '@/hooks'
+import { Label } from '../Label'
export function CalculationBase() {
- const { prices } = usePrices()
+ const { prices, isValidating } = usePrices()
return (
-
- 1 ASI
-
= ${prices.asi}
+ 1 ASI
+ = ${prices.asi}
-
- 1 Fet = {ratioFetToAsi} ASI
- fixed
-
= ${prices.fet}
+
+ 1 Fet = {ratioFetToAsi} ASI
+
+
+ = ${prices.fet}
-
- 1 OCEAN = {ratioOceanToAsi} ASI
- fixed
-
= ${prices.ocean}
+
+ 1 OCEAN = {ratioOceanToAsi} ASI
+
+
+ = ${prices.ocean}
-
- 1 AGIX = {ratioAgixToAsi} ASI
- fixed
-
= ${prices.agix}
+
+ 1 AGIX = {ratioAgixToAsi} ASI
+
+
+ = ${prices.agix}
)
diff --git a/components/Label/Label.module.css b/components/Label/Label.module.css
new file mode 100644
index 0000000..538957c
--- /dev/null
+++ b/components/Label/Label.module.css
@@ -0,0 +1,8 @@
+.label {
+ font-size: 0.65rem;
+ color: rgba(var(--foreground-rgb), 0.6);
+ border: 1px solid rgba(var(--foreground-rgb), 0.15);
+ border-radius: var(--border-radius);
+ padding: 0.05rem 0.3rem;
+ margin: 0 0.2rem;
+}
diff --git a/components/Label/Label.tsx b/components/Label/Label.tsx
new file mode 100644
index 0000000..d38ee9c
--- /dev/null
+++ b/components/Label/Label.tsx
@@ -0,0 +1,5 @@
+import styles from './Label.module.css'
+
+export function Label({ children }: { children: React.ReactNode }) {
+ return {children}
+}
diff --git a/components/Label/index.tsx b/components/Label/index.tsx
new file mode 100644
index 0000000..e7141a8
--- /dev/null
+++ b/components/Label/index.tsx
@@ -0,0 +1 @@
+export * from './Label'
diff --git a/components/ResultRow/ResultRow.module.css b/components/ResultRow/ResultRow.module.css
index b13479e..f288283 100644
--- a/components/ResultRow/ResultRow.module.css
+++ b/components/ResultRow/ResultRow.module.css
@@ -15,11 +15,6 @@
gap: 0.5rem;
align-items: center;
width: 100%;
- margin-bottom: 0.25rem;
-}
-
-.resultLine:last-child {
- margin-bottom: 0;
}
.fiat {
@@ -63,19 +58,3 @@
filter: grayscale(1);
}
}
-
-.isValidating {
- animation: flicker 2s infinite ease-out forwards;
-}
-
-@keyframes flicker {
- 0% {
- opacity: 0.25;
- }
- 50% {
- opacity: 1;
- }
- 100% {
- opacity: 0.25;
- }
-}
diff --git a/components/ResultRow/ResultRow.tsx b/components/ResultRow/ResultRow.tsx
index 59897f0..29fa508 100644
--- a/components/ResultRow/ResultRow.tsx
+++ b/components/ResultRow/ResultRow.tsx
@@ -24,11 +24,7 @@ export function Result({
}: Props) {
return (
-
+
- {formatNumber(amount || 0, tokenSymbol)}
+
+ {formatNumber(amount || 0, tokenSymbol)}
+
{amountOriginalFiat ? (
@@ -46,16 +44,17 @@ export function Result({
) : null}
-
+
-
+
{formatNumber(amountAsi || 0, 'ASI')}
-
+
{formatNumber(amountFiat || 0, 'USD')}
diff --git a/components/Strategies/Buy.tsx b/components/Strategies/Buy.tsx
index 29f5534..53d0bdb 100644
--- a/components/Strategies/Buy.tsx
+++ b/components/Strategies/Buy.tsx
@@ -1,7 +1,7 @@
'use client'
import { ratioOceanToAsi, ratioAgixToAsi, ratioFetToAsi } from '@/constants'
-import { Result } from '../ResultRow'
+import { Result } from '@/components/ResultRow'
import { useState } from 'react'
import { useDebounce } from 'use-debounce'
import stylesShared from './styles.module.css'
@@ -9,7 +9,7 @@ import { usePrices } from '@/hooks'
import { FormAmount } from '@/components/FormAmount'
export function Buy() {
- const { prices, isValidating } = usePrices()
+ const { prices, isValidating, isLoading } = usePrices()
const [amount, setAmount] = useState(100)
const [debouncedAmount] = useDebounce(amount, 500)
diff --git a/components/Strategies/Swap.tsx b/components/Strategies/Swap.tsx
index 88b2fc5..00b060c 100644
--- a/components/Strategies/Swap.tsx
+++ b/components/Strategies/Swap.tsx
@@ -36,7 +36,7 @@ export function Swap() {
return (
- Swapping{' '}
+ Holding or swapping{' '}