diff --git a/.env.sample b/.env.sample index a4a2ee6..ca80356 100755 --- a/.env.sample +++ b/.env.sample @@ -1,4 +1,4 @@ -NEXT_PUBLIC_RPC_URL=https://starknet-mainnet.public.blastapi.io/ -RPC_URL=https://starknet-mainnet.public.blastapi.io/ +NEXT_PUBLIC_RPC_URL= +RPC_URL= DATABASE_URL= diff --git a/.husky/_/h b/.husky/_/h deleted file mode 100644 index 6e73f45..0000000 --- a/.husky/_/h +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env sh -[ "$HUSKY" = "2" ] && set -x -n=$(basename "$0") -s=$(dirname "$(dirname "$0")")/$n - -[ ! -f "$s" ] && exit 0 - -if [ -f "$HOME/.huskyrc" ]; then - echo "husky - '~/.huskyrc' is DEPRECATED, please move your code to ~/.config/husky/init.sh" -fi -i="${XDG_CONFIG_HOME:-$HOME/.config}/husky/init.sh" -[ -f "$i" ] && . "$i" - -[ "${HUSKY-}" = "0" ] && exit 0 - -export PATH="node_modules/.bin:$PATH" -sh -e "$s" "$@" -c=$? - -[ $c != 0 ] && echo "husky - $n script failed (code $c)" -[ $c = 127 ] && echo "husky - command not found in PATH=$PATH" -exit $c diff --git a/.husky/pre-commit b/.husky/pre-commit index 75f391e..e72aa91 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1 +1 @@ -yarn run lint:fix && yarn run format:fix +yarn run lint:fix && yarn run format:fix \ No newline at end of file diff --git a/package.json b/package.json index ee6a878..d6879f3 100755 --- a/package.json +++ b/package.json @@ -50,6 +50,7 @@ "react-device-detect": "2.2.3", "react-dom": "18", "react-hot-toast": "2.4.1", + "react-icons": "^5.3.0", "react-mixpanel": "1.0.5", "react-pro-sidebar": "1.1.0", "react-responsive-carousel": "3.2.23", diff --git a/src/app/api/tnc/getUser/route.ts b/src/app/api/tnc/getUser/[address]/route.ts similarity index 82% rename from src/app/api/tnc/getUser/route.ts rename to src/app/api/tnc/getUser/[address]/route.ts index 3519680..515527f 100644 --- a/src/app/api/tnc/getUser/route.ts +++ b/src/app/api/tnc/getUser/[address]/route.ts @@ -3,8 +3,9 @@ import { NextResponse } from 'next/server'; import { db } from '@/db'; import { standariseAddress } from '@/utils'; -export async function POST(req: Request) { - const { address } = await req.json(); +export async function GET(_req: Request, context: any) { + const { params } = context; + const address = params.address; if (!address) { return NextResponse.json({ diff --git a/src/app/globals.css b/src/app/globals.css index ca51445..fa1b60d 100755 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -126,3 +126,9 @@ body { width: 95%; flex: 0 0 100%; } + +.theme-gradient-text { + background: linear-gradient(to right, var(--chakra-colors-purple) 10%, var(--chakra-colors-cyan) 50%, var(--chakra-colors-cyan) 100%); + -webkit-background-clip: text; + color: transparent; +} \ No newline at end of file diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 6b9a104..bcc2dee 100755 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -34,6 +34,7 @@ export default function RootLayout({ + {children} diff --git a/src/app/page.tsx b/src/app/page.tsx index cea50fb..5327fee 100755 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -94,10 +94,12 @@ export default function Home() { fontSize={{ base: '28px', md: '35px' }} lineHeight={'30px'} marginBottom={'10px'} - color={'cyan'} textAlign={'center'} > - Starknet's Yield Powerhouse🚀 + + Starknet's Yield Powerhouse + + 🚀 { mixpanel.track('Strategies opened'); }} @@ -189,7 +191,7 @@ export default function Home() { { mixpanel.track('All pools clicked'); }} @@ -200,7 +202,7 @@ export default function Home() { diff --git a/src/app/strategy/[strategyId]/_components/Strategy.tsx b/src/app/strategy/[strategyId]/_components/Strategy.tsx index ea99c57..439c76a 100755 --- a/src/app/strategy/[strategyId]/_components/Strategy.tsx +++ b/src/app/strategy/[strategyId]/_components/Strategy.tsx @@ -101,9 +101,9 @@ const Strategy = ({ params }: StrategyParams) => { {strategy ? strategy.name : 'Strategy Not found'} @@ -220,7 +220,7 @@ const Strategy = ({ params }: StrategyParams) => { { // mixpanel.track('All pools clicked') }} @@ -229,7 +229,7 @@ const Strategy = ({ params }: StrategyParams) => { { // mixpanel.track('Strategies opened') }} @@ -240,7 +240,7 @@ const Strategy = ({ params }: StrategyParams) => { diff --git a/src/app/strategy/[strategyId]/page.tsx b/src/app/strategy/[strategyId]/page.tsx index 56d9e83..3b5d2b6 100644 --- a/src/app/strategy/[strategyId]/page.tsx +++ b/src/app/strategy/[strategyId]/page.tsx @@ -27,12 +27,7 @@ export async function generateMetadata({ params }: StrategyParams) { export default function StrategyPage({ params }: StrategyParams) { return ( - + ); diff --git a/src/app/strategy/layout.tsx b/src/app/strategy/layout.tsx deleted file mode 100755 index 6316d42..0000000 --- a/src/app/strategy/layout.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; - -export default function StrategiesLayout({ - children, -}: Readonly<{ - children: React.ReactNode; -}>) { - return <>{children}; -} diff --git a/src/app/template.tsx b/src/app/template.tsx index eaf510a..206324e 100755 --- a/src/app/template.tsx +++ b/src/app/template.tsx @@ -20,6 +20,9 @@ import { Toaster } from 'react-hot-toast'; import { RpcProviderOptions, constants } from 'starknet'; import { ArgentMobileConnector } from 'starknetkit/argentMobile'; import { InjectedConnector } from 'starknetkit/injected'; +import { Inter } from 'next/font/google'; + +const inter = Inter({ subsets: ['latin'] }); mixpanel.init('118f29da6a372f0ccb6f541079cad56b'); @@ -40,9 +43,11 @@ const theme = extendTheme({ light_grey: '#9d9d9d', disabled_text: '#818181', disabled_bg: '#5f5f5f', - purple: '#2F2D5C', + purple: '#6e53dc', cyan: '#7DFACB', bg: '#111119', // dark blue + grey_text: '#B6B6B6', + yellow: '#EFDB72', }, fontSizes: { large: '50px', @@ -57,10 +62,16 @@ const theme = extendTheme({ MenuItem: { bg: 'highlight', }, + Badge: { + baseStyle: { + lineHeight: 'initial', + borderRadius: '4px', + }, + }, }, fonts: { - heading: `'Courier New', Courier, monospace`, - body: `'Courier New', Courier, monospace`, + heading: inter.style.fontFamily, + body: inter.style.fontFamily, }, }); diff --git a/src/assets/shield.svg b/src/assets/shield.svg new file mode 100644 index 0000000..198e3ee --- /dev/null +++ b/src/assets/shield.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/components/Filters.tsx b/src/components/Filters.tsx index 4463e19..48308e2 100755 --- a/src/components/Filters.tsx +++ b/src/components/Filters.tsx @@ -62,19 +62,19 @@ const colourStyles: StylesConfig = { dropdownIndicator: (styles) => { return { ...styles, - color: 'var(--chakra-colors-color2Text)', + color: 'var(--chakra-colors-purple)', }; }, clearIndicator: (styles) => { return { ...styles, - color: 'var(--chakra-colors-color2Text)', + color: 'var(--chakra-colors-purple)', }; }, indicatorSeparator: (styles) => { return { ...styles, - backgroundColor: 'var(--chakra-colors-color2Text)', + backgroundColor: 'var(--chakra-colors-purple)', }; }, menu: (styles) => { @@ -112,7 +112,7 @@ export default function Filters() { // const colors: readonly string[] = ['#00B8D9', '#407cd5', '#7967e5', '#FF5630', // '#FF8B00','#FFC400', '#36B37E', '#00875A', '#253858', '#666666'] - const colors = ['rgba(86, 118, 254, 1)', 'rgb(127 73 229)']; + const colors = ['rgba(132, 132, 195, 1)']; const updateFilters = useSetAtom(updateFiltersAtom); const protocolOptions: readonly Option[] = filters.protocols.map( @@ -137,16 +137,16 @@ export default function Filters() { as="span" flex="1" textAlign="right" - color="color2Text" + color="purple" marginRight="10px" > Filters - + - + Protocols: - + Protocol types: