Skip to content

Commit

Permalink
Moar fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
noisekit committed May 1, 2024
1 parent 0460658 commit 49b7e9c
Show file tree
Hide file tree
Showing 17 changed files with 30 additions and 18 deletions.
5 changes: 3 additions & 2 deletions ultrasound/ui/components/BurnSNX.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { Button, Flex, Image, Link, Text, Tooltip, useDisclosure } from '@chakra-ui/react';
import { BurnSNXModal } from './BurnSNXModal';
import { isBaseAndromeda } from '@snx-v3/isBaseAndromeda';
import { useNetwork } from '@snx-v3/useBlockchain';
import { useSNXPrice } from '../hooks/useSNXPrice';
import burnSnxSvg from './burn-snx.svg';
import { BurnSNXModal } from './BurnSNXModal';

export function BurnSNX() {
const { network } = useNetwork();
Expand All @@ -18,7 +19,7 @@ export function BurnSNX() {
bg="navy.700"
w="415px"
>
<Image src="/burn-snx.svg" h="284px" />
<Image src={burnSnxSvg} h="284px" />
<Flex flexDir="column" gap="6" p="4">
<Text fontWeight={700} fontSize="18px" color="white">
Sell SNX at premium and watch it burn
Expand Down
12 changes: 7 additions & 5 deletions ultrasound/ui/components/BurnSNXModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,17 @@ import {
Spinner,
Text,
} from '@chakra-ui/react';
import { useApprove } from '@snx-v3/useApprove';
import { useWallet } from '@snx-v3/useBlockchain';
import { useTokenBalance } from '@snx-v3/useTokenBalance';
import { SNXUSDBalanceOfBuyBackContract } from '../hooks/SNXUSDBalanceOfBuyBackContract';
import { useApprove } from '@snx-v3/useApprove';
import Wei from '@synthetixio/wei';
import { useState } from 'react';
import { useSellSNX } from '../mutations/useSellSNX';
import { SNXUSDBalanceOfBuyBackContract } from '../hooks/SNXUSDBalanceOfBuyBackContract';
import { useBurnEvents } from '../hooks/useBurnEvents';
import { useSNXPrice } from '../hooks/useSNXPrice';
import { useSellSNX } from '../mutations/useSellSNX';
import snxInputSvg from './snx-input.svg';
import usdcSvg from './usdc.svg';

export function BurnSNXModal({ isOpen, onClose }: { isOpen: boolean; onClose: () => void }) {
const [amount, setAmount] = useState<Wei | undefined>(new Wei(0));
Expand Down Expand Up @@ -69,7 +71,7 @@ export function BurnSNXModal({ isOpen, onClose }: { isOpen: boolean; onClose: ()
w="90px"
gap="2"
>
<Image src="/snx-input.svg" />
<Image src={snxInputSvg} />
<Text fontWeight={700} fontSize="16px">
SNX
</Text>
Expand Down Expand Up @@ -144,7 +146,7 @@ export function BurnSNXModal({ isOpen, onClose }: { isOpen: boolean; onClose: ()
w="120px"
gap="2"
>
<Image src="/usdc.svg" />
<Image src={usdcSvg} />
<Text fontWeight={700} fontSize="16px">
USDC
</Text>
Expand Down
10 changes: 6 additions & 4 deletions ultrasound/ui/components/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { Box, Button, Divider, Flex, Image, Text, useColorMode } from '@chakra-ui/react';
import { useIsConnected, useNetwork, useWallet } from '@snx-v3/useBlockchain';
import { shortAddress } from '../utils/addresses';
import { NetworkSelect } from './NetworkSelect';
import { useTokenBalance } from '@snx-v3/useTokenBalance';
import { useEffect } from 'react';
import { shortAddress } from '../utils/addresses';
import { NetworkSelect } from './NetworkSelect';
import snxSmallSvg from './snx-small.svg';
import snxSvg from './snx.svg';

export function Header() {
const { colorMode, toggleColorMode } = useColorMode();
Expand All @@ -21,7 +23,7 @@ export function Header() {
return (
<Flex as="header" p="2" flexDir="column" w="100%" gap="2">
<Flex w="100%" justifyContent="space-between" alignItems="center" px="5">
<Image src="/snx.svg" />
<Image src={snxSvg} />
<Flex alignItems="center" gap="2">
<Box
border="1px solid"
Expand All @@ -33,7 +35,7 @@ export function Header() {
gap="2"
alignItems="center"
>
<Image src="/snx-small.svg" />
<Image src={snxSmallSvg} />
<Text fontSize="14px" fontWeight={600}>
{snxBalance ? snxBalance?.toNumber().toFixed(2) : '-'}
</Text>
Expand Down
9 changes: 5 additions & 4 deletions ultrasound/ui/components/Main.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { Flex, Heading, Image, Link, Spinner, Text } from '@chakra-ui/react';
import { useBurnEvents } from '../hooks/useBurnEvents';
import { BurnSNX } from './BurnSNX';
import { Chart } from './Chart';
import { SupplyChangeStats } from './SupplyChangeStats';
import { CurrentSupplyStats } from './CurrentSupplyStats';
import { BurnSNX } from './BurnSNX';
import { useBurnEvents } from '../hooks/useBurnEvents';
import kainSvg from './kain.svg';
import { SupplyChangeStats } from './SupplyChangeStats';

export function Main() {
const { data: events, isLoading } = useBurnEvents();
Expand All @@ -20,7 +21,7 @@ export function Main() {
</Heading>
</Flex>
<Flex alignItems="center">
<Image src="/kain.svg" />
<Image src={kainSvg} />
<Flex flexDir="column">
<Text fontSize="16px" fontWeight={700} color="white">
Mansion counter
Expand Down
8 changes: 5 additions & 3 deletions ultrasound/ui/components/SupplyChangeStats.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { InfoIcon } from '@chakra-ui/icons';
import { Flex, Image, Link, Spinner, Text, Tooltip } from '@chakra-ui/react';
import { useBurnEvents } from '../hooks/useBurnEvents';
import { InfoIcon } from '@chakra-ui/icons';
import burnSvg from './burn.svg';
import mintedSvg from './minted.svg';

export function SupplyChangeStats() {
const { data: events, isLoading } = useBurnEvents();
Expand Down Expand Up @@ -41,7 +43,7 @@ export function SupplyChangeStats() {
-{events?.supplyChange7Days.toString()} SNX
</Text>
<Flex gap="2" alignItems="center">
<Image src="/burn.svg" />
<Image src={burnSvg} />
<Text fontSize="16px" color="gray.500" fontWeight={400}>
Burnt
</Text>
Expand All @@ -50,7 +52,7 @@ export function SupplyChangeStats() {
</Text>
</Flex>
<Flex gap="2" alignItems="center">
<Image src="/minted.svg" />
<Image src={mintedSvg} />
<Text fontSize="16px" color="gray.500" fontWeight={400}>
Minted
</Text>
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
1 change: 1 addition & 0 deletions ultrasound/ui/public/_redirects
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* /index.html 200
Binary file removed ultrasound/ui/public/favicon.ico
Binary file not shown.
2 changes: 2 additions & 0 deletions ultrasound/ui/public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
User-agent: *
Disallow: /
1 change: 1 addition & 0 deletions ultrasound/ui/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const isTest = process.env.NODE_ENV === 'test';
const htmlPlugin = new HtmlWebpackPlugin({
template: './index.html',
scriptLoading: 'defer',
favicon: './favicon.ico',
minify: false,
hash: false,
xhtml: true,
Expand Down

0 comments on commit 49b7e9c

Please sign in to comment.