Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add logo #2

Open
wants to merge 159 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
159 commits
Select commit Hold shift + click to select a range
6c05240
updated env files
mikestarrdev Feb 28, 2023
44b3a12
refactor directories and components
mikestarrdev Mar 1, 2023
57b29e7
login page
mikestarrdev Mar 1, 2023
ea4bcf3
send request rendering
mikestarrdev Mar 1, 2023
b25c3d3
send component
mikestarrdev Mar 2, 2023
94c9656
Logins working
pi0neerpat Mar 2, 2023
3a8aa2c
home page styling
mikestarrdev Mar 3, 2023
9fafca5
asset selection modal
mikestarrdev Mar 3, 2023
efbdc98
troubleshoot login
mikestarrdev Mar 3, 2023
3d61723
troubleshoot hydration error
mikestarrdev Mar 3, 2023
52a5e62
fixed Head component hydration errors
mikestarrdev Mar 3, 2023
27d484b
useEffect route users to login if no session
mikestarrdev Mar 3, 2023
5c8020e
Merge branch 'hackathon' into patrick-keyp-changes
mikestarrdev Mar 3, 2023
25d03af
Merge pull request #1 from pi0neerpat/patrick-keyp-changes
mikestarrdev Mar 3, 2023
9e759cb
added social logo and user address to Navbar
mikestarrdev Mar 5, 2023
5145805
added toggle for Discord and Google click handlers
mikestarrdev Mar 5, 2023
70b9b25
added basic validations to form
mikestarrdev Mar 5, 2023
60d3f58
refactored Inputs into Chakra theme
mikestarrdev Mar 5, 2023
d39cdc0
react formContext object
mikestarrdev Mar 5, 2023
1f8f663
added fontsource/inter library
mikestarrdev Mar 10, 2023
7394343
finished most UI components
mikestarrdev Mar 11, 2023
620bff1
added validations to asset input
mikestarrdev Mar 11, 2023
4ac6f7e
logout dropdown in navbar
mikestarrdev Mar 13, 2023
0a37da8
troubleshooting cors error
mikestarrdev Mar 13, 2023
4b83312
added tooltip to copy address btn
mikestarrdev Mar 13, 2023
0b90205
Fund working
pi0neerpat Mar 16, 2023
a5ed3ad
Update useApi.ts
pi0neerpat Mar 16, 2023
17f3d8a
Update [...nextauth].js
pi0neerpat Mar 16, 2023
0fe878a
Merge pull request #4 from personnamedmike/cors-api-updates
mikestarrdev Mar 16, 2023
214281a
Update .env.example back to port 3000
pi0neerpat Mar 16, 2023
6520893
api call for offramps
mikestarrdev Mar 16, 2023
f6187f8
TransactionType component and request form
mikestarrdev Mar 17, 2023
ff72eea
navigation arrows
mikestarrdev Mar 17, 2023
2f9d52d
fixed display=flex on TransactionSlider
mikestarrdev Mar 18, 2023
6e2045d
added button animations
mikestarrdev Mar 19, 2023
a0d81bf
swapped confirmation component with confirmation page
mikestarrdev Mar 19, 2023
7f3e2bf
Merge pull request #7 from personnamedmike/hackathon
mikestarrdev Mar 19, 2023
8bd3700
Merge branch 'main' of https://github.com/personnamedmike/JBFeather
mikestarrdev Mar 19, 2023
cd20b76
fixed build
mikestarrdev Mar 19, 2023
26d09e9
fixed file names
mikestarrdev Mar 19, 2023
5419694
fix font directories
mikestarrdev Mar 19, 2023
547aa8b
changed font directory
mikestarrdev Mar 19, 2023
55d10e7
email and discord username validations
mikestarrdev Mar 20, 2023
9725940
Merge branch 'main' into hackathon
mikestarrdev Mar 20, 2023
05b0e38
Merge pull request #8 from personnamedmike/hackathon
mikestarrdev Mar 20, 2023
6df50a3
fixed fonts directories
mikestarrdev Mar 20, 2023
939ca22
fixed font directories
mikestarrdev Mar 20, 2023
5b8bf9d
fixed font directories
mikestarrdev Mar 20, 2023
9fb2db0
impored fonts to App component
mikestarrdev Mar 20, 2023
e7fc5c2
edit fonts and theme files
mikestarrdev Mar 20, 2023
fa9799f
fixed font names
mikestarrdev Mar 20, 2023
6b6f3f0
eot file type to fonts
mikestarrdev Mar 20, 2023
d4d9551
change fonts directory
mikestarrdev Mar 20, 2023
f773127
change fonts directory
mikestarrdev Mar 20, 2023
ceb26a9
move sharpie fonts into /sharpie folder
mikestarrdev Mar 20, 2023
3c11b8f
font path
mikestarrdev Mar 20, 2023
bd2cd91
font path
mikestarrdev Mar 20, 2023
90885d6
fix font path
mikestarrdev Mar 20, 2023
67f96d7
otf font files
mikestarrdev Mar 20, 2023
8582b40
changed font imports
mikestarrdev Mar 20, 2023
adabc70
changed font imports
mikestarrdev Mar 20, 2023
6da030b
moved fonts within app
mikestarrdev Mar 20, 2023
58ad9ac
fixed fonts
mikestarrdev Mar 20, 2023
5e60199
resizing components
mikestarrdev Mar 21, 2023
0d00c50
fixed mobile responsive sizes
mikestarrdev Mar 21, 2023
871ffb3
Merge pull request #9 from personnamedmike/nodemailer
mikestarrdev Mar 21, 2023
214fd08
login font size
mikestarrdev Mar 21, 2023
142812d
input font fix
mikestarrdev Mar 21, 2023
9f2a713
navbar signout spacing
mikestarrdev Mar 21, 2023
67abf73
review send cancel sizing
mikestarrdev Mar 21, 2023
e931c6c
removed arrows and scroll logic from Transaction Slider
mikestarrdev Mar 22, 2023
d79a642
ux changes
mikestarrdev Mar 22, 2023
5f2a125
Merge pull request #10 from personnamedmike/fonts
mikestarrdev Mar 22, 2023
4b83f09
white fade to slider
mikestarrdev Mar 22, 2023
f5b8740
Merge pull request #11 from personnamedmike/fonts
mikestarrdev Mar 22, 2023
9103ecd
fixed slider width
mikestarrdev Mar 22, 2023
79664ba
merging
mikestarrdev Mar 22, 2023
3ab3104
Merge branch 'main' into fonts
mikestarrdev Mar 22, 2023
0739087
Merge pull request #12 from personnamedmike/fonts
mikestarrdev Mar 22, 2023
aeece4f
login btn color changes
mikestarrdev Mar 23, 2023
fd5039d
Merge pull request #13 from personnamedmike/ux-changes
mikestarrdev Mar 23, 2023
27477de
powered by Keyp text fix
mikestarrdev Mar 23, 2023
111ff9f
login page width fixes
mikestarrdev Mar 23, 2023
b2e5412
fixed hover of login btns
mikestarrdev Mar 23, 2023
1c08125
added state and calculations to place buttons at bottom of the screen
mikestarrdev Mar 23, 2023
51cd7c5
confirmation page height calculations
mikestarrdev Mar 23, 2023
f2982c5
Merge pull request #14 from personnamedmike/button-alignment
mikestarrdev Mar 23, 2023
8820af6
confirmation page return btn margin
mikestarrdev Mar 23, 2023
e5bc1f6
ButtonSpacingWraper for button spacing fix
mikestarrdev Mar 24, 2023
e225430
Merge pull request #15 from personnamedmike/button-fixes
mikestarrdev Mar 24, 2023
2a2f529
fixed file paths
mikestarrdev Mar 24, 2023
becfe3f
fixed sizeContext import paths
mikestarrdev Mar 24, 2023
3b421e6
finished button fixes
mikestarrdev Mar 24, 2023
2759f66
request text conditionals in review and confirmation
mikestarrdev Mar 24, 2023
9b3a415
useRouter in confirmation
mikestarrdev Mar 24, 2023
0fbc7d2
nodemailer tls error
mikestarrdev Mar 25, 2023
ff8a128
removed unused font files
mikestarrdev Mar 25, 2023
6a9a233
fixed login page flickering. Setup API call to retrieve email on Revi…
mikestarrdev Mar 25, 2023
9a57387
loading component
mikestarrdev Mar 25, 2023
46826e5
setup nodemailer
mikestarrdev Mar 27, 2023
18c8b7c
Merge pull request #17 from personnamedmike/request-form
mikestarrdev Mar 27, 2023
81ac411
fixed qpi route (removed res.status before a res)
mikestarrdev Mar 28, 2023
c3bfedc
dynamic vars in confirmation page
mikestarrdev Mar 28, 2023
20ad0b8
Merge pull request #18 from personnamedmike/request-form
mikestarrdev Mar 28, 2023
7c11035
home button
mikestarrdev Mar 28, 2023
98bd507
removed query string from email url
mikestarrdev Mar 28, 2023
8955752
styled error messages
mikestarrdev Mar 29, 2023
d7f86ab
Merge pull request #19 from personnamedmike/error-msg-handling
mikestarrdev Mar 29, 2023
01a3f61
remove Inter font on Tooltip
mikestarrdev Mar 29, 2023
705ea90
added data argument to useKeypApi
mikestarrdev Apr 4, 2023
a647e1d
added TypeScript safety to nextauth file. Created next-auth type file
mikestarrdev Apr 4, 2023
f66b205
Info typescript safeety for nodemailer
mikestarrdev Apr 4, 2023
0170220
refactored API hook and API requests
mikestarrdev Apr 5, 2023
462aea5
handleSendTx function in ReviewTransfer
mikestarrdev Apr 5, 2023
c2b3afd
AssetBalance component with tokenBalance endpoint
mikestarrdev Apr 6, 2023
1e40abd
AssetBalance modal logic setup
mikestarrdev Apr 7, 2023
5f7a005
insufficient balance to TransferForm
mikestarrdev Apr 7, 2023
ba7769c
Merge pull request #20 from personnamedmike/tokens-endpoint
mikestarrdev Apr 7, 2023
a589078
fixed rendering of AssetBalance ballance
mikestarrdev Apr 7, 2023
a8de9b5
Merge pull request #21 from personnamedmike/bug-fixes
mikestarrdev Apr 7, 2023
d92b941
fixed rendering of AssetBalance balance
mikestarrdev Apr 7, 2023
2f5da4f
changed data argument for tokens/transfer
mikestarrdev Apr 7, 2023
d8b0eb9
Merge pull request #22 from personnamedmike/bug-fixes
mikestarrdev Apr 7, 2023
6426d3c
UseKeypApi call fixes
mikestarrdev Apr 7, 2023
e9cdd30
refactored ReviewTransfer component
mikestarrdev Apr 7, 2023
c72795c
Merge pull request #23 from personnamedmike/fixes
mikestarrdev Apr 7, 2023
0f0e598
inputColorLogicErrors for amount input
mikestarrdev Apr 7, 2023
73a8182
refactored social icon selection to ToPlatformSelection component
mikestarrdev Apr 7, 2023
ff82b45
Merge pull request #24 from personnamedmike/code-refactors
mikestarrdev Apr 7, 2023
1de4ea1
margin-x styling
mikestarrdev Apr 7, 2023
7e1a47e
Merge pull request #25 from personnamedmike/code-refactors
mikestarrdev Apr 7, 2023
501e5b0
assetBalance style fixes
mikestarrdev Apr 7, 2023
0f596c3
Merge pull request #26 from personnamedmike/code-refactors
mikestarrdev Apr 7, 2023
3047d95
wallet
mikestarrdev Apr 7, 2023
31b1488
Merge pull request #27 from personnamedmike/wallet
mikestarrdev Apr 7, 2023
0a466d6
fixed home link in navbar
mikestarrdev Apr 7, 2023
e988e72
fixed token transfer, added error handling for failed transfers
mikestarrdev Apr 7, 2023
b460d22
Merge pull request #28 from personnamedmike/troubleshooting
mikestarrdev Apr 7, 2023
d53fed8
New transaction slider
jahabeebs Apr 7, 2023
d7956f5
Merge remote-tracking branch 'origin/main' into feature/jacob-changes
jahabeebs Apr 7, 2023
084d386
added lint fixes, error handling on balance query
jahabeebs Apr 7, 2023
504d376
sign out user if unauthorized
jahabeebs Apr 7, 2023
535bfe9
hover effect, lint fixes, state error fix
jahabeebs Apr 7, 2023
57fcd48
transaction slider bug
jahabeebs Apr 7, 2023
6d41801
Merge pull request #29 from personnamedmike/feature/jacob-changes
mikestarrdev Apr 9, 2023
a451940
fix scrollRef Type errors
mikestarrdev Apr 9, 2023
55b0a93
breakpoint makes TransactionSlider scrollable on small screens
mikestarrdev Apr 10, 2023
c312f13
fixed error handling on Request form
mikestarrdev Apr 10, 2023
7a008c8
Merge pull request #30 from personnamedmike/fix-scrollbar
mikestarrdev Apr 10, 2023
e29ff1c
375 breakpoint for transaction slider scrolling
mikestarrdev Apr 10, 2023
0301995
responsiveness for TxSlider se tto 400
mikestarrdev Apr 10, 2023
9b6f0b1
stop horizontal scrolling
mikestarrdev Apr 10, 2023
7b32474
padding-Y scrollbar
mikestarrdev Apr 10, 2023
309b5bc
add WETH address
mikestarrdev Apr 10, 2023
c28d7cd
scrollable txslider
mikestarrdev Apr 10, 2023
82033d2
Update api to allow local testing
pi0neerpat Apr 10, 2023
f8291ab
Merge branch 'main' of https://github.com/personnamedmike/KachingETHD…
pi0neerpat Apr 10, 2023
cd76a3a
cleanup
pi0neerpat Apr 10, 2023
81b019d
add logo
pi0neerpat Apr 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
####################
# REQUIRED
KEYP_CLIENT_ID=
TOKEN_SECRET=
# Domain where app is served
NEXTAUTH_URL=http://localhost:3002
# Your application Client ID from https://dev.usekeyp.com
NEXT_PUBLIC_KEYP_CLIENT_ID=

NEXTAUTH_URL=http://localhost:3000 # Domain where you serve the app
NEXTAUTH_SESSION_COOKIE_SECRET=tokensecret # Random string for NextAuth cookies. Generate with `openssl rand -base64 32`

####################
# Optional (local testing)
# NODE_TLS_REJECT_UNAUTHORIZED makes TLS connections and HTTPS requests insecure by disabling certificate verification
NODE_TLS_REJECT_UNAUTHORIZED=0
NODE_TLS_REJECT_UNAUTHORIZED=0
EMAIL=
EMAIL_PASS=
26 changes: 5 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,9 @@
# Juicebox x Feather test
# Kaching

# Setup
Sign onto Google or Discord and send crypto.

## Install
Kaching uses Keyp (https://www.usekeyp.com/) to let users send crypto to one another.

```bash
yarn
```
By signing into Kaching with Google or Discord, you can create a non-custodial wallet on Polygon network.

## Environment

1. Copy the file `.env.example` to `.env`
2. Create a new application on on https://dev.usekeyp.com.

- Set the redirect URI to `http://localhost:3000/api/auth/callback/keyp` (note that your port may be different).
- Copy the "CLIENT ID" for your application and set it to `KEYP_CLIENT_ID` in `.env`

3. In the `.env`, set `TOKEN_SECRET` to a random string e.g. `openssl rand -base64 32`. (Do not use your access token here)

# Run

```bash
yarn dev
```
Kaching or Keyp will NEVER have access to your private keys. You can extract your private keys from your Keyp account at https://app.usekeyp.com/.
Empty file added api
Empty file.
115 changes: 115 additions & 0 deletions components/AssetBalance.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
import { Box, HStack, Image, Text } from "@chakra-ui/react";
import axios from "axios";
import { useFormContext } from "context/FormContext";
import { signOut, useSession } from "next-auth/react";
import React, { Dispatch, useEffect, useState } from "react";
import { UserBalance } from "types/keypEndpoints";
import { supportedAssets } from "utils/general";

interface AssetBalanceProps {
setBalanceError: Dispatch<boolean>;
}
/**
* @remarks component calls UseTokenBalance hook to get user token balance from Keyp API
* @param setBalanceError - useState function passed in from TransferForm. If this gets set to true, error about balance will render on TransferForm
* @returns div that renders token balance for selected token. Renders an error message if user balance < amount user wants to send
*/
const AssetBalance: React.FC<AssetBalanceProps> = ({ setBalanceError }) => {
const [userAssets, setUserAssets] = useState<UserBalance | undefined>();
const [isLoading, setIsLoading] = useState(true);
const { type, asset, amount } = useFormContext();
const { data: session } = useSession();
const tokenAddress = supportedAssets[asset];

const balance = () => {
if (userAssets) {
if (asset === "MATIC") {
let formattedAsset = userAssets["ETH"]?.formatted;
return Number(formattedAsset).toFixed(4);
} else {
let { ...address } = userAssets;
let formattedAsset = Object.values(address)[0].formatted;
return Number(formattedAsset).toFixed(4);
}
} else {
return null;
}
};
const displayBalance = balance();

useEffect(() => {
/**
* @remarks - pass boolean to parent component TransferForm. If balance < amount, return true and display error message in TransferForm. Loading indicator shows if API call lags
* @param amount - user generated asset amount from input. Taken from FormContext
* @param balance - balance of asset
* @returns boolean value comparing amount to balance
*/
const compareBalanceToInput = (
amount: number | undefined,
balance: number
): void => {
if (amount && displayBalance) {
if (balance < amount && type === "send") {
setBalanceError(true);
} else {
setBalanceError(false);
}
}
};

compareBalanceToInput(amount, Number(displayBalance));
}, [type, amount, displayBalance, setBalanceError]);

useEffect(() => {
const ACCESS_TOKEN = session?.user.accessToken;
const userId = session?.user.id;

const options = {
headers: {
Authorization: `Bearer ${ACCESS_TOKEN}`,
},
};

// TODO: handling of ETH. Currently "ETH" really is "MATIC". Add WETH address to `supportedAddresses` dictionary
const urlMATIC = `https://api.usekeyp.com/v1/users/${userId}/balance`;
const urlNotMATIC = `https://api.usekeyp.com/v1/users/${userId}/balance/${tokenAddress}`;
axios
.get(asset === "MATIC" ? urlMATIC : urlNotMATIC, options)
.then((response) => {
setUserAssets(response.data);
setIsLoading(false);
})
.catch((error) => {
if (error?.response?.status === 401) {
signOut();
}
setIsLoading(false);
console.error(error);
});
// eslint-disable-next-line
}, [asset, tokenAddress]);

return (
<Box
color="loginBtnGray"
fontSize={asset.length > 4 ? "0.95rem" : ["1.25rem", "1.5rem"]}
fontWeight="normal"
textAlign="right"
mt={0}
>
<Text color="socialIconsGray">Your Balance</Text>

{isLoading && (
<HStack>
<Text>Loading...</Text>
<Image src="keyp_spinner.svg" alt="" w="1.5rem" />
</HStack>
)}
<Text display={isLoading ? "none" : "block"}>
{displayBalance ? `${"$"}${displayBalance} ${asset}` : "Error"}
</Text>
</Box>
);
};

export default AssetBalance;
85 changes: 85 additions & 0 deletions components/AssetModal.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
import React from "react";
import {
Box,
Button,
Modal,
ModalBody,
ModalContent,
ModalFooter,
ModalOverlay,
Text,
useDisclosure,
} from "@chakra-ui/react";
import { useState } from "react";
import { useFormContext } from "context/FormContext";

/**
* @remarks modal opens when user clicks on asset name
* @param setGetAsset useState hook variable that captures string of asset
* @returns modal that renders a list of assets
*/
const AssetModal = () => {
const [selectedAsset, setSelectedAsset] = useState("USDC");
const { setAsset } = useFormContext();
const { isOpen, onOpen, onClose } = useDisclosure();

const handleClickedAsset = (asset: string) => {
setSelectedAsset(asset);
setAsset(asset);
};

const handleDone = () => {
setAsset(selectedAsset);
onClose();
};

// TODO: get list of assets from API and render those instead
const assets = ["MATIC", "ETH", "USDC", "DAI"];
const renderAssets = assets.map((asset) => {
return (
<Box
onClick={() => handleClickedAsset(asset)}
key={asset}
color={selectedAsset === asset ? "assetOrange" : "#C2C2C2"}
px={[0, 0, "5rem"]}
>
<Text>{asset}</Text>
</Box>
);
});

return (
<>
<Button
onClick={() => onOpen()}
fontSize="5rem"
fontWeight="extrabold"
color="assetOrange"
variant="none"
mb={-5}
p={0}
>
{selectedAsset}
</Button>
<Box mt={"1.5rem"}>
<Modal onClose={onClose} size={"full"} isOpen={isOpen}>
<ModalOverlay />
<ModalContent>
<ModalBody fontSize="5rem" fontWeight="extrabold" color="#C2C2C2">
{renderAssets}
</ModalBody>
<ModalFooter mx="-1.5rem" mb="-1.5rem">
<Box w="full">
<Button onClick={() => handleDone()} variant="formBlue">
Done
</Button>
</Box>
</ModalFooter>
</ModalContent>
</Modal>
</Box>
</>
);
};

export default AssetModal;
36 changes: 36 additions & 0 deletions components/ButtonSpacingWrapper.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import React, { ReactNode } from "react";
import { Box } from "@chakra-ui/react";
import { useSizeProvider } from "../context/SizeContext";

interface ButtonSpacingWrapperProps {
children: ReactNode;
isTransactionSlider: boolean;
}

/**
*
* @param children - components to be wrapped
* @param isTransactionSlider - boolean to determine if txSliderHeight should be subtracted from the height of the wrapper
* @returns - div that wraps the children components and ensures that the buttons are always at the bottom of the page
*/
const ButtonSpacingWrapper: React.FC<ButtonSpacingWrapperProps> = ({
children,
isTransactionSlider,
}) => {
const { navHeight, txSliderHeight } = useSizeProvider();

return (
<Box
display="flex"
flexDirection="column"
justifyContent="space-between"
h={`calc(98vh - ${navHeight}px - ${
isTransactionSlider ? txSliderHeight : 0
}px)`}
>
{children}
</Box>
);
};

export default ButtonSpacingWrapper;
78 changes: 78 additions & 0 deletions components/CashOut.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
import React, { useState } from "react";
import { Box, Button, Heading, Image, Text, VStack } from "@chakra-ui/react";
import UseKeypApi from "../hooks/useKeypApi";
import { useSession } from "next-auth/react";
import { useFormContext } from "../context/FormContext";
import ButtonSpacingWrapper from "./ButtonSpacingWrapper";

/**
* @remarks - this component lets user withdraw from their wallet. ButtonSpacingWrapper is used place "Back" button at the bottom of the page
* @returns - CashOut component that displays offramps for users to withdraw from their wallet
*/
const CashOut = () => {
const [coinbaseLoading, setCoinbaseLoading] = useState(false);
const { data: session } = useSession();
const { handleHomePage } = useFormContext();

const handleClickCashOut = async (rampType: string) => {
const request = await UseKeypApi({
accessToken: session?.user.accessToken,
method: "GET",
endpoints: "ramps",
urlParams1: "off",
urlParams2: rampType,
});
if (request?.url) window.location = request?.url;
return request.url || null;
};

return (
<ButtonSpacingWrapper isTransactionSlider={true}>
<Box
w={["full", "full", "80%", "50%"]}
mx="auto"
px={[0, 0, "5rem"]}
mt="2rem"
>
<Heading as="h3">
<Text color="socialIconsGray" textAlign="center">
Withdraw from your Wallet
</Text>
</Heading>
<VStack spacing="1.5rem" mt="2.5rem">
{/* <Box w="full">
<Button
variant="ramps"
color="#22272F"
onClick={() => handleClickCashOut("RAMP_NETWORK")}
>
<Image src={"payment-ramp.svg"} alt="Ramp" />
</Button>
</Box> */}
<Box w="full">
<Button
variant="ramps"
color="#4A4D53"
isLoading={coinbaseLoading}
loadingText="Loading"
onClick={() => {
handleClickCashOut("COINBASE");
setCoinbaseLoading(true);
}}
>
<Image src={"payment-coinbase.svg"} alt="" />
<Text ml="1rem">Coinbase</Text>
</Button>
</Box>
</VStack>
</Box>
<Box mt="1rem" mx="-1.5rem" mb="-1rem">
<Button variant="formBlue" onClick={() => handleHomePage()}>
Back
</Button>
</Box>
</ButtonSpacingWrapper>
);
};

export default CashOut;
28 changes: 28 additions & 0 deletions components/Fonts.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { Global } from "@emotion/react";

const Fonts = () => (
<Global
styles={`
@font-face {
font-family: "Sharpie";
src: url("/fonts/sharpie/Sharpie-Regular.woff2") format("woff2"),
url("/fonts/sharpie/Sharpie-Regular.woff") format("woff"),
url("/fonts/sharpie/Sharpie-Regular.ttf") format("truetype");
font-weight: 400;
font-display: swap;
font-style: normal;
}
@font-face {
font-family: "Sharpie";
src: url("/fonts/sharpie/Sharpie-Extrabold.woff2") format("woff2"),
url("/fonts/sharpie/Sharpie-Extrabold.woff") format("woff"),
url("/fonts/sharpie/Sharpie-Extrabold.ttf") format("truetype");
font-weight: 800;
font-display: swap;
font-style: normal;
}
`}
/>
);

export default Fonts;
Loading