diff --git a/web/leaderboard/.eslintrc.json b/web/leaderboard/.eslintrc.json deleted file mode 100644 index bffb357a7..000000000 --- a/web/leaderboard/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "next/core-web-vitals" -} diff --git a/web/leaderboard/.gitignore b/web/leaderboard/.gitignore deleted file mode 100644 index 289440abd..000000000 --- a/web/leaderboard/.gitignore +++ /dev/null @@ -1,42 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js -.yarn/install-state.gz - -# testing -/coverage - -# next.js -/.next/ -/out/ - -# production -/build - -# misc -.DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# local env files -.env*.local - -# vercel -.vercel - -# typescript -*.tsbuildinfo -next-env.d.ts - -# Sentry Config File -.sentryclirc - -# Sentry Config File -.sentryclirc diff --git a/web/leaderboard/Dockerfile.frontend b/web/leaderboard/Dockerfile.frontend deleted file mode 100644 index 63ff1bf75..000000000 --- a/web/leaderboard/Dockerfile.frontend +++ /dev/null @@ -1,38 +0,0 @@ - -FROM fluidity/build-web-container:latest AS build - -WORKDIR /usr/local/src/fluidity/web - -ENV PRODUCTION ${PRODUCTION} - -ARG CI - -ARG GITHUB_TOKEN - -ENV CI $CI - -ENV PATH /app/node_modules.bin:$PATH - -COPY . ./ - -RUN yarn - -ARG FLU_SENTRY_DSN - -WORKDIR /usr/local/src/fluidity/web/leaderboard - -RUN make frontend - -FROM fluidity/runtime-web-container:latest - -WORKDIR /usr/local/src/fluidity/web - -COPY --from=build /usr/local/src/fluidity/web . - -WORKDIR /usr/local/src/fluidity/web/leaderboard - -EXPOSE 3000 - -RUN mkdir .next && touch .next/BUILD_ID && echo "999" > .next/BUILD_ID - -CMD ["yarn", "start"] diff --git a/web/leaderboard/Makefile b/web/leaderboard/Makefile deleted file mode 100644 index 83242a782..000000000 --- a/web/leaderboard/Makefile +++ /dev/null @@ -1,39 +0,0 @@ - -REPO := leaderboard - -FRONTEND_SRC_DIR := src - -FRONTEND_SRC_TS_DIR := ${FRONTEND_SRC_DIR} -FRONTEND_SRC_SASS_DIR := ${FRONTEND_SRC_DIR}/styles - -FRONTEND_SRC_TS := $(shell find ${FRONTEND_SRC_TS_DIR} -name '*ts*') -FRONTEND_SRC_SASS := ${FRONTEND_SRC_SASS_DIR}/config.scss - -FRONTEND_SRC := ${FRONTEND_SRC_TS} ${FRONTEND_SRC_SASS} - -include ../../web.mk - -NEXTJS_BUILD := cd .. && turbo build --filter website - -nextjs: - ${NEXTJS_BUILD} - -${FRONTEND_BUILD}: nextjs - @touch ${FRONTEND_BUILD} - -# No the double dot is not a typo. Turbo builds are from the monorepo root. -docker-frontend: ${FRONTEND_SRC} - @${DOCKER_BUILD} \ - ${DOCKERFLAGS} \ - ${DOCKER_BUILD_ARGS} \ - -t "${ORG_ROOT}/${REPO}-frontend" \ - -f Dockerfile.frontend \ - .. - - @touch docker-frontend - -run-docker: ${FILES} docker - @${DOCKER} run ${DOCKERFLAGS} -i -p 80:80 ${REPO} - -clean: - rm -f docker-backend docker-frontend diff --git a/web/leaderboard/README.md b/web/leaderboard/README.md deleted file mode 100644 index 55a976585..000000000 --- a/web/leaderboard/README.md +++ /dev/null @@ -1,11 +0,0 @@ -This is a fUSDC leaderboard ranking project. Receive diffretent data - 24Hours and AllTime. - -## Getting Started - -First, run the development server: - -```bash -yarn dev -``` - -Open [http://localhost:30001](http://localhost:3001) with your browser to see the result. diff --git a/web/leaderboard/cypress.config.ts b/web/leaderboard/cypress.config.ts deleted file mode 100644 index e6b8b76bf..000000000 --- a/web/leaderboard/cypress.config.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { defineConfig } from "cypress"; - -export default defineConfig({ - component: { - devServer: { - framework: "next", - bundler: "webpack", - }, - }, - - e2e: { - setupNodeEvents(on, config) { - // implement node event listeners here - }, - }, -}); diff --git a/web/leaderboard/cypress/e2e/page.cy.ts b/web/leaderboard/cypress/e2e/page.cy.ts deleted file mode 100644 index 4f8917945..000000000 --- a/web/leaderboard/cypress/e2e/page.cy.ts +++ /dev/null @@ -1,76 +0,0 @@ -import type { NextApiRequest, NextApiResponse } from "next"; - -type User = { - address: string; - number_of_transactions: number; - rank: number; - volume: number; - yield_earned: number; -}; - -const users = [ - { - address: "0x21f2275f26611fba1d486153b5d2d78164568435", - number_of_transactions: 21898, - rank: 2388, - volume: 255.13345799999914, - yield_earned: 18.985949367059586, - }, - { - address: "0x1cb94adfd3314d48ca8145b2c6983419257c0486", - number_of_transactions: 12520, - rank: 3682, - volume: 894699.873285003, - yield_earned: 482.0982366909158, - }, - { - address: "0xe776ffdab7b40147fc0b8e93676eb444fb3650b6", - number_of_transactions: 7135, - rank: 4260, - volume: 240194.4372060101, - yield_earned: 920.81961067, - }, -]; - -describe("Home Page Tests", () => { - beforeEach(() => { - cy.visit("http://localhost:3001"); - }); - - it("loads the main elements on the page", () => { - cy.get("main").should("exist"); - cy.get('[class*="header"]').should("exist"); - cy.contains("h1", "Fluidity Leaderboard").should("exist"); - }); - - it("change filters on click all time", () => { - cy.get("[data-cy=all-btn]").click(); - cy.get("[data-cy=title]").contains("ALL TIME"); - }); - - it("open Connect Wallet Modal", () => { - cy.get('[class*="connected_wallet"]').should("exist"); - cy.get('[class*="connected_wallet"]').click(); - cy.wait(10000); - cy.get('[class*="connect-wallet-outer-container"]').should("exist"); - }); - - it("Confirms the number of adresses in the table", () => { - expect(users).to.be.an("array"); - - users.forEach((user) => { - expect(user).to.have.all.keys( - "address", - "number_of_transactions", - "rank", - "volume", - "yield_earned" - ); - expect(user.address).to.be.a("string"); - expect(user.number_of_transactions).to.be.a("number"); - expect(user.rank).to.be.a("number"); - expect(user.volume).to.be.a("number"); - expect(user.yield_earned).to.be.a("number"); - }); - }); -}); diff --git a/web/leaderboard/cypress/e2e/profile.cy.ts b/web/leaderboard/cypress/e2e/profile.cy.ts deleted file mode 100644 index 4d4998bd4..000000000 --- a/web/leaderboard/cypress/e2e/profile.cy.ts +++ /dev/null @@ -1,12 +0,0 @@ -describe("Connect Wallet Modal Open Test", () => { - beforeEach(() => { - cy.visit("http://localhost:3001"); - }); - - it("open Connect Wallet Modal", () => { - cy.get('[class*="connected_wallet"]').should("exist"); - cy.get('[class*="connected_wallet"]').click(); - cy.wait(10000); - cy.get('[class*="connect-wallet-outer-container"]').should("exist"); - }); -}); diff --git a/web/leaderboard/cypress/e2e/table.cy.ts b/web/leaderboard/cypress/e2e/table.cy.ts deleted file mode 100644 index 24dc3c04c..000000000 --- a/web/leaderboard/cypress/e2e/table.cy.ts +++ /dev/null @@ -1,26 +0,0 @@ -describe("Table Component E2E Tests", () => { - beforeEach(() => { - cy.visit("http://localhost:3001"); - }); - - it("should display the correct table headings", () => { - const headings = [ - "RANK", - "USER", - "#TX", - "VOLUME (USD)", - "YIELD EARNED (USD)", - ]; - headings.forEach((heading) => { - cy.contains("th", heading).should("be.visible"); - }); - }); - - it("should display data rows correctly when data is loaded", () => { - cy.get('[class*="page_table_row"]').should("have.length.at.least", 1); - }); - - it("should show a loading state when data is being fetched", () => { - cy.contains("Fetching table data...").should("be.visible"); - }); -}); diff --git a/web/leaderboard/cypress/support/commands.ts b/web/leaderboard/cypress/support/commands.ts deleted file mode 100644 index e69de29bb..000000000 diff --git a/web/leaderboard/cypress/support/component-index.html b/web/leaderboard/cypress/support/component-index.html deleted file mode 100644 index 3e16e9b07..000000000 --- a/web/leaderboard/cypress/support/component-index.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - Components App - -
- - -
- - \ No newline at end of file diff --git a/web/leaderboard/cypress/support/component.ts b/web/leaderboard/cypress/support/component.ts deleted file mode 100644 index 37f59edbe..000000000 --- a/web/leaderboard/cypress/support/component.ts +++ /dev/null @@ -1,39 +0,0 @@ -// *********************************************************** -// This example support/component.ts is processed and -// loaded automatically before your test files. -// -// This is a great place to put global configuration and -// behavior that modifies Cypress. -// -// You can change the location of this file or turn off -// automatically serving support files with the -// 'supportFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/configuration -// *********************************************************** - -// Import commands.js using ES2015 syntax: -import './commands' - -// Alternatively you can use CommonJS syntax: -// require('./commands') - -import { mount } from 'cypress/react18' - -// Augment the Cypress namespace to include type definitions for -// your custom command. -// Alternatively, can be defined in cypress/support/component.d.ts -// with a at the top of your spec. -declare global { - namespace Cypress { - interface Chainable { - mount: typeof mount - } - } -} - -Cypress.Commands.add('mount', mount) - -// Example use: -// cy.mount() \ No newline at end of file diff --git a/web/leaderboard/cypress/support/e2e.ts b/web/leaderboard/cypress/support/e2e.ts deleted file mode 100644 index f80f74f8e..000000000 --- a/web/leaderboard/cypress/support/e2e.ts +++ /dev/null @@ -1,20 +0,0 @@ -// *********************************************************** -// This example support/e2e.ts is processed and -// loaded automatically before your test files. -// -// This is a great place to put global configuration and -// behavior that modifies Cypress. -// -// You can change the location of this file or turn off -// automatically serving support files with the -// 'supportFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/configuration -// *********************************************************** - -// Import commands.js using ES2015 syntax: -import './commands' - -// Alternatively you can use CommonJS syntax: -// require('./commands') \ No newline at end of file diff --git a/web/leaderboard/next-env.d.ts b/web/leaderboard/next-env.d.ts deleted file mode 100644 index fd36f9494..000000000 --- a/web/leaderboard/next-env.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/// -/// -/// - -// NOTE: This file should not be edited -// see https://nextjs.org/docs/basic-features/typescript for more information. diff --git a/web/leaderboard/next.config.js b/web/leaderboard/next.config.js deleted file mode 100644 index 80dc3d24e..000000000 --- a/web/leaderboard/next.config.js +++ /dev/null @@ -1,47 +0,0 @@ -/** @type {import('next').NextConfig} */ -const nextConfig = {}; - -module.exports = nextConfig; - - -// Injected content via Sentry wizard below - -const { withSentryConfig } = require("@sentry/nextjs"); - -module.exports = withSentryConfig( - module.exports, - { - // For all available options, see: - // https://github.com/getsentry/sentry-webpack-plugin#options - - // Suppresses source map uploading logs during build - silent: true, - org: "fluidity-money", - project: "fluidity-money", - }, - { - // For all available options, see: - // https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/ - - // Upload a larger set of source maps for prettier stack traces (increases build time) - widenClientFileUpload: true, - - // Transpiles SDK to be compatible with IE11 (increases bundle size) - transpileClientSDK: true, - - // Routes browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers (increases server load) - tunnelRoute: "/monitoring", - - // Hides source maps from generated client bundles - hideSourceMaps: true, - - // Automatically tree-shake Sentry logger statements to reduce bundle size - disableLogger: true, - - // Enables automatic instrumentation of Vercel Cron Monitors. - // See the following for more information: - // https://docs.sentry.io/product/crons/ - // https://vercel.com/docs/cron-jobs - automaticVercelMonitors: true, - } -); diff --git a/web/leaderboard/package.json b/web/leaderboard/package.json deleted file mode 100644 index 6f9e7ce64..000000000 --- a/web/leaderboard/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "leaderboard", - "version": "0.1.0", - "private": true, - "scripts": { - "dev": "next dev", - "build": "next build", - "start": "next start", - "lint": "next lint" - }, - "dependencies": { - "@apollo/client": "^3.8.8", - "@fluidity-money/surfing": "*", - "@sentry/nextjs": "^7.93.0", - "framer-motion": "^10.16.4", - "graphql": "^16.8.1", - "next": "14.1.1", - "next-urql": "^5.0.2", - "react": "^18", - "react-dom": "^18", - "urql": "^4.0.0", - "viem": "^1.19.7", - "wagmi": "^1.4.7" - }, - "devDependencies": { - "@types/cypress": "^1.1.3", - "@types/node": "^20", - "@types/react": "^18", - "@types/react-dom": "^18", - "cypress": "^13.6.1", - "eslint": "^8", - "eslint-config-next": "14.0.1", - "typescript": "^5" - }, - "browser": { - "fs": false, - "os": false, - "path": false - } -} diff --git a/web/leaderboard/public/checked.svg b/web/leaderboard/public/checked.svg deleted file mode 100644 index 15a096397..000000000 --- a/web/leaderboard/public/checked.svg +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c8f159a5401c8a1f03702e134bda02af0659b1232b51572f7aa369202959818f -size 383 diff --git a/web/leaderboard/public/copyIconCircle.svg b/web/leaderboard/public/copyIconCircle.svg deleted file mode 100644 index fa0bd695f..000000000 --- a/web/leaderboard/public/copyIconCircle.svg +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4259503f608e3d679c5f35302a18f31ad7e012e77215b4d04944ef0aa1223213 -size 720 diff --git a/web/leaderboard/public/disconnectIcon.svg b/web/leaderboard/public/disconnectIcon.svg deleted file mode 100644 index 48faa35dc..000000000 --- a/web/leaderboard/public/disconnectIcon.svg +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:289166032937ebe13fcb083753f720d6b462ab74e357eb15ffdfb62a5d347c50 -size 645 diff --git a/web/leaderboard/public/favicon.ico b/web/leaderboard/public/favicon.ico deleted file mode 100644 index a498ee813..000000000 Binary files a/web/leaderboard/public/favicon.ico and /dev/null differ diff --git a/web/leaderboard/public/manifest.json b/web/leaderboard/public/manifest.json deleted file mode 100644 index 71254a1ac..000000000 --- a/web/leaderboard/public/manifest.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "icons": [ - { - "src": "favicon.ico", - "sizes": "64x64 32x32 24x24 16x16", - "type": "image/x-icon" - } - ] -} diff --git a/web/leaderboard/public/socials/discord.svg b/web/leaderboard/public/socials/discord.svg deleted file mode 100644 index 2c093d90f..000000000 --- a/web/leaderboard/public/socials/discord.svg +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:802319ea264649eddcc459a4bdd0eda410d9f79c09fc94fed7a28efa0d27e305 -size 3127 diff --git a/web/leaderboard/public/socials/linkedin.svg b/web/leaderboard/public/socials/linkedin.svg deleted file mode 100644 index 1fb0c4ea9..000000000 --- a/web/leaderboard/public/socials/linkedin.svg +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:69c1b097733b5bcf7dd0f35a218e754a22c612cd93edcf15efc25a9ecff06773 -size 514 diff --git a/web/leaderboard/public/socials/telegram.svg b/web/leaderboard/public/socials/telegram.svg deleted file mode 100644 index 9b7edaa31..000000000 --- a/web/leaderboard/public/socials/telegram.svg +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f841605ae5adccc3be61dd672629f13647170d16690e0d8ae1f46e28ac2f4871 -size 1250 diff --git a/web/leaderboard/public/socials/twitter.svg b/web/leaderboard/public/socials/twitter.svg deleted file mode 100644 index f12b141df..000000000 --- a/web/leaderboard/public/socials/twitter.svg +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:69876bc90d945f48fe2e415c2b6d345b28be2c44e13c3514885deb6f2cd48fd4 -size 844 diff --git a/web/leaderboard/public/user.svg b/web/leaderboard/public/user.svg deleted file mode 100644 index 5367b2045..000000000 --- a/web/leaderboard/public/user.svg +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a4e70add6b77ebfc530b4bd9b14bec7ff37280119b884dc396b9552c419d20dc -size 1150331 diff --git a/web/leaderboard/public/x.svg b/web/leaderboard/public/x.svg deleted file mode 100644 index ddb3caa3a..000000000 --- a/web/leaderboard/public/x.svg +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f54c97f8cac6d3daec848bd12df4d0f5becb9261216c734657927035775f4e35 -size 787 diff --git a/web/leaderboard/sentry.client.config.ts b/web/leaderboard/sentry.client.config.ts deleted file mode 100644 index 64c547684..000000000 --- a/web/leaderboard/sentry.client.config.ts +++ /dev/null @@ -1,31 +0,0 @@ -// This file configures the initialization of Sentry on the client. -// The config you add here will be used whenever a users loads a page in their browser. -// https://docs.sentry.io/platforms/javascript/guides/nextjs/ -// - -import * as Sentry from "@sentry/nextjs"; - -Sentry.init({ - dsn: process.env.FLU_SENTRY_DSN, - - // Adjust this value in production, or use tracesSampler for greater control - tracesSampleRate: 1, - - // Setting this option to true will print useful information to the console while you're setting up Sentry. - debug: false, - - replaysOnErrorSampleRate: 1.0, - - // This sets the sample rate to be 10%. You may want this to be 100% while - // in development and sample at a lower rate in production - replaysSessionSampleRate: 0.1, - - // You can remove this option if you're not planning to use the Sentry Session Replay feature: - integrations: [ - new Sentry.Replay({ - // Additional Replay configuration goes in here, for example: - maskAllText: true, - blockAllMedia: true, - }), - ], -}); diff --git a/web/leaderboard/sentry.edge.config.ts b/web/leaderboard/sentry.edge.config.ts deleted file mode 100644 index e96585f60..000000000 --- a/web/leaderboard/sentry.edge.config.ts +++ /dev/null @@ -1,16 +0,0 @@ -// This file configures the initialization of Sentry for edge features (middleware, edge routes, and so on). -// The config you add here will be used whenever one of the edge features is loaded. -// Note that this config is unrelated to the Vercel Edge Runtime and is also required when running locally. -// https://docs.sentry.io/platforms/javascript/guides/nextjs/ - -import * as Sentry from "@sentry/nextjs"; - -Sentry.init({ - dsn: process.env.FLU_SENTRY_DSN, - - // Adjust this value in production, or use tracesSampler for greater control - tracesSampleRate: 1, - - // Setting this option to true will print useful information to the console while you're setting up Sentry. - debug: false, -}); diff --git a/web/leaderboard/sentry.server.config.ts b/web/leaderboard/sentry.server.config.ts deleted file mode 100644 index 5d2d2cd99..000000000 --- a/web/leaderboard/sentry.server.config.ts +++ /dev/null @@ -1,15 +0,0 @@ -// This file configures the initialization of Sentry on the server. -// The config you add here will be used whenever the server handles a request. -// https://docs.sentry.io/platforms/javascript/guides/nextjs/ - -import * as Sentry from "@sentry/nextjs"; - -Sentry.init({ - dsn: process.env.FLU_SENTRY_DSN, - - // Adjust this value in production, or use tracesSampler for greater control - tracesSampleRate: 1, - - // Setting this option to true will print useful information to the console while you're setting up Sentry. - debug: false, -}); diff --git a/web/leaderboard/src/app/components/Card/Card.module.scss b/web/leaderboard/src/app/components/Card/Card.module.scss deleted file mode 100644 index 34b6497f2..000000000 --- a/web/leaderboard/src/app/components/Card/Card.module.scss +++ /dev/null @@ -1,285 +0,0 @@ -$white-a40: rgba(255, 255, 255, 0.4); -$white-a20: rgba(255, 255, 255, 0.2); -$white-a10: rgba(255, 255, 255, 0.1); -$white-a5: rgba(255, 255, 255, 0.05); -$white: #ffffff; - -$holo: conic-gradient( - from 209.59deg at 50% 50%, - #f3b8d8 0deg, - #b793e9 50.06deg, - #9fd4f3 85.94deg, - #ffd2c4 134.97deg, - #fbf3f3 172.05deg, - #d9abdf 200.75deg, - #af9ce3 224.67deg, - #aae4e1 259.36deg, - #c6ead0 298.82deg, - #ffffff 328.72deg, - #fdb5e4 360deg -); - -$holo-linear: linear-gradient( - 90deg, - #f3b8d8 0%, - #b793e9 15.1%, - #9fd4f3 26.04%, - #ffd2c4 36.46%, - #fbf3f3 46.88%, - #d9abdf 57.29%, - #af9ce3 72.4%, - #aae4e1 85.42%, - #c6ead0 93.23%, - #fdb5e4 100% -); - -$border: ( - "disabled": $white-a10, - "default": $white-a20, - "prominent": $white, - "focus": $white-a40, -); - -.card { - display: flex; - flex-direction: column; - width: fit-content; - height: fit-content; - padding: 1em; - box-sizing: border-box; - - &.shimmer { - -webkit-mask: linear-gradient( - -60deg, - #000000 40%, - rgba(0, 0, 0, 0.717), - #000 60% - ) - right/300% 100%; - mask: linear-gradient(-60deg, #000000 40%, rgba(0, 0, 0, 0.715), #000 60%) - right/300% 100%; - background-repeat: no-repeat; - animation: shimmer 5s infinite; - background-color: black; - } - - &.fill { - width: 100%; - } - - &.button { - all: unset; - font-size: 1em; - cursor: pointer; - display: flex; - flex-direction: column; - width: fit-content; - height: fit-content; - padding: 1em; - } - - &.rounded { - border-radius: 12px; - } - - &[disabled] { - cursor: not-allowed; - border-color: map-get($border, "disabled"); - filter: grayscale(100%); - } - - // Borders - border-width: 0; - border-style: none; - - &.solid { - border-width: 1px; - border-style: solid; - } - - &.dashed { - border-width: 1px; - border-style: dashed; - } - - // Colors - &.gray { - background-color: $white-a5; - border-color: map-get($border, "default"); - } - - &.white { - background-color: $white; - border-color: $white; - } - - &.holo { - position: relative; - border: none; - overflow: hidden; - background: $holo-linear; - background-size: 1600px; - animation: gradient 15s ease infinite; - - &.transparent { - background: none; - - &::before { - content: ""; - position: absolute; - pointer-events: none; - top: 0; - left: 0; - right: 0; - bottom: 0; - padding: 2px; - background: $holo; - -webkit-mask: linear-gradient(#fff 0 0) content-box, - linear-gradient(#fff 0 0); - mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); - -webkit-mask-composite: xor; - mask-composite: exclude; - } - - &.rounded { - &::before { - border-radius: 12px; - } - } - - &.dashed { - &::before { - border: 1px dashed black; - padding: 0; - } - } - - &.none { - &::before { - border: 1px solid black; - padding: 0; - } - } - } - - &.frosted { - background: rgba(255, 255, 255, 0.05); - backdrop-filter: blur(50px); - -webkit-backdrop-filter: blur(50px); - - &::before { - content: ""; - position: absolute; - pointer-events: none; - top: 0; - left: 0; - right: 0; - bottom: 0; - padding: 1px; - background: $holo; - -webkit-mask: linear-gradient(#fff 0 0) content-box, - linear-gradient(#fff 0 0); - mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); - -webkit-mask-composite: xor; - mask-composite: exclude; - } - - &.rounded { - &::before { - border-radius: 12px; - } - } - - &.dashed { - &::before { - border: 1px dashed black; - padding: 0; - } - } - - &.none { - &::before { - border: 1px solid black; - padding: 0; - } - } - } - } - - // Backgrounds - &.transparent { - background-color: transparent; - } - - &.dashed { - border-style: dashed; - } - - &.frosted { - // background: rgba(255, 255, 255, 0.05); - backdrop-filter: blur(50px); - -webkit-backdrop-filter: blur(50px); - - // Override border styles - &.dashed, - &.solid, - &.none { - box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1); - border-style: solid; - border-color: rgba(255, 255, 255, 0.102); - } - } -} - -@keyframes shimmer { - 0%, - 10% { - -webkit-mask-position: right/300%; - } - 90%, - 100% { - -webkit-mask-position: -50%; - } -} - -@keyframes gradient { - 0% { - background-position: 0 0; - } - 50% { - background-position: 600px 0; - } - 100% { - background-position: 0 0; - } -} - -.shimmerWrapper { - position: relative; - overflow: hidden; - - &.fill { - width: 100%; - } - - &.rounded { - border-radius: 12px; - } - - &.heading { - > * { - flex: 0 0; - } - } - - .shimmerBackground { - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - background: white; - filter: blur(100px); - z-index: -1; - } -} diff --git a/web/leaderboard/src/app/components/Card/Card.tsx b/web/leaderboard/src/app/components/Card/Card.tsx deleted file mode 100644 index 2db39d6cf..000000000 --- a/web/leaderboard/src/app/components/Card/Card.tsx +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright 2022 Fluidity Money. All rights reserved. Use of this -// source code is governed by a GPL-style license that can be found in the -// LICENSE.md file. - -import styles from "./Card.module.scss"; - -export interface ICard { - component?: "div" | "button" | "tr"; - style?: React.CSSProperties; - rounded?: boolean; - disabled?: boolean; - fill?: boolean; - shimmer?: boolean; - type?: "opaque" | "transparent" | "frosted"; - border?: "solid" | "dashed" | "none"; - color?: "gray" | "white" | "holo"; - [_: string]: any; -} - -const Card = ({ - component = "div", - style = {}, - rounded = true, - className = "", - disabled = false, - children, - fill = false, - shimmer = false, - type = "opaque", - border = "none", - color = "gray", - ...props -}: ICard) => { - const Component = component; - - const typeClass = type !== "opaque" ? styles[type] : ""; - const borderClass = styles[border]; - const colorClass = styles[color]; - const elementClass = component === "button" ? styles[component] : ""; - const propsClass = className; - - const allClasses = ` - ${styles.card} - ${elementClass} - ${colorClass} - ${rounded ? styles.rounded : ""} - ${fill ? styles.fill : ""} - ${shimmer ? styles.shimmer : ""} - ${borderClass} - ${typeClass} - ${propsClass} - `; - - const CardContent = ( - - {children} - - ); - - if (shimmer) - return ( -
-
- {CardContent} -
- ); - - return CardContent; -}; - -export default Card; diff --git a/web/leaderboard/src/app/components/Card/index.tsx b/web/leaderboard/src/app/components/Card/index.tsx deleted file mode 100644 index fc91b3df0..000000000 --- a/web/leaderboard/src/app/components/Card/index.tsx +++ /dev/null @@ -1 +0,0 @@ -export { default as Card } from "./Card"; diff --git a/web/leaderboard/src/app/components/ConnectWallet/ConnectedWallet/ConnectedWallet.module.scss b/web/leaderboard/src/app/components/ConnectWallet/ConnectedWallet/ConnectedWallet.module.scss deleted file mode 100644 index e933fb67a..000000000 --- a/web/leaderboard/src/app/components/ConnectWallet/ConnectedWallet/ConnectedWallet.module.scss +++ /dev/null @@ -1,59 +0,0 @@ -.connected_btn { - all: unset; - cursor: pointer; - font-size: 0.8em; - display: flex; - gap: 10px; - align-items: center; - border: 0.5px solid transparent; - padding: 0.2em; - border-radius: 2em; - - span { - font-family: Aeonik, sans-serif; - font-weight: 400; - line-height: 1.2; - letter-spacing: 0.01em; - color: #fff; - font-size: 1.25em; - } - - &:hover { - border: 0.5px solid white; - background-color: transparent; - color: #fff; - border-radius: 2em; - } -} - -.holo { - background: conic-gradient( - from 209.59deg at 50% 50%, - #f3b8d8 0deg, - #b793e9 50.06deg, - #9fd4f3 85.94deg, - #ffd2c4 134.97deg, - #fbf3f3 172.05deg, - #d9abdf 200.75deg, - #af9ce3 224.67deg, - #aae4e1 259.36deg, - #c6ead0 298.82deg, - #ffffff 328.72deg, - #fdb5e4 360deg - ); - height: 40px; - width: 40px; - border-radius: 50%; - display: flex; - justify-content: center; - align-items: center; -} - -.connected-btn-in-modal img { - background: none; -} - -.connected_img { - background: none; - border: none; -} diff --git a/web/leaderboard/src/app/components/ConnectWallet/ConnectedWallet/ConnectedWallet.tsx b/web/leaderboard/src/app/components/ConnectWallet/ConnectedWallet/ConnectedWallet.tsx deleted file mode 100644 index 7f4224f16..000000000 --- a/web/leaderboard/src/app/components/ConnectWallet/ConnectedWallet/ConnectedWallet.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import Image from "next/image"; -import { Text, trimAddress, trimAddressShort } from "@fluidity-money/surfing"; - -import styles from "./ConnectedWallet.module.scss"; - -type IConnectedWallet = { - address: string; - callback: () => void; - className?: string; - short?: boolean; -}; - -const ConnectedWallet = ({ - address, - callback, - className, - short = true, -}: IConnectedWallet) => { - return ( - - ); -}; - -export default ConnectedWallet; diff --git a/web/leaderboard/src/app/components/ConnectWallet/index.ts b/web/leaderboard/src/app/components/ConnectWallet/index.ts deleted file mode 100644 index 65f0d480f..000000000 --- a/web/leaderboard/src/app/components/ConnectWallet/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { default as ConnectedWallet } from "./ConnectedWallet/ConnectedWallet"; diff --git a/web/leaderboard/src/app/components/Dropdown/Dropdown.module.scss b/web/leaderboard/src/app/components/Dropdown/Dropdown.module.scss deleted file mode 100644 index 06570e866..000000000 --- a/web/leaderboard/src/app/components/Dropdown/Dropdown.module.scss +++ /dev/null @@ -1,37 +0,0 @@ -.dropdown_options { - background: rgba(50, 50, 50, 0.75); - box-sizing: border-box; - padding: 5px; - border-radius: 12px; - position: absolute; - top: 20px; - right: 0px; - width: 175px; - display: flex; - flex-direction: column; - - ul { - margin: 0; - padding: 0; - - li { - list-style: none; - - .option { - all: unset; - font-size: 0.8rem; - display: flex; - justify-content: space-between; - align-items: center; - width: 100%; - border-radius: 12px; - padding: 8px 12px; - box-sizing: border-box; - - &:hover { - background: rgba(99, 99, 99, 0.75); - } - } - } - } -} diff --git a/web/leaderboard/src/app/components/Dropdown/dropdown.cy.tsx b/web/leaderboard/src/app/components/Dropdown/dropdown.cy.tsx deleted file mode 100644 index c9beea82b..000000000 --- a/web/leaderboard/src/app/components/Dropdown/dropdown.cy.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import React from "react"; -import { DropdownOptions } from "./index"; -import "@fluidity-money/surfing"; -import "./Dropdown.module.scss"; - -describe("DropdownOptions Component", () => { - let setSortedByItem: any; - let setOpenDropdown: any; - let sortData: any; - - beforeEach(() => { - setSortedByItem = cy.stub(); - setOpenDropdown = cy.stub(); - sortData = cy.stub(); - - cy.mount( - - ); - }); - - it("renders correctly", () => { - cy.get("[class*='dropdown_options']").should("exist"); - cy.get("[class*='dropdown_options'] ul li").should("have.length", 3); - }); - - it("handles option click correctly", () => { - const optionTitles = ["volume", "rewards", "number"]; - - optionTitles.forEach((title, index) => { - cy.get("[class*='dropdown_options'] ul li") - .eq(index) - .click() - .then(() => { - expect(setSortedByItem).to.be.calledWith(optionTitles[index]); - expect(setOpenDropdown).to.be.calledWith(false); - expect(sortData).to.be.calledWith(optionTitles[index].toLowerCase()); - }); - }); - }); -}); diff --git a/web/leaderboard/src/app/components/Dropdown/index.tsx b/web/leaderboard/src/app/components/Dropdown/index.tsx deleted file mode 100644 index 22351af4b..000000000 --- a/web/leaderboard/src/app/components/Dropdown/index.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import { Text } from "@fluidity-money/surfing"; - -import { SORTING_INDEX } from "../../config"; - -import styles from "./Dropdown.module.scss"; - -const sortedBy = [ - { title: "VOLUME", name: SORTING_INDEX.VOLUME }, - { title: "REWARDS", name: SORTING_INDEX.REWARDS }, - { title: "#TX", name: SORTING_INDEX.NUMBER }, -]; - -export const DropdownOptions = ({ - setSortedByItem, - setOpenDropdown, - sortData, -}: { - setSortedByItem: (value: SORTING_INDEX) => void; - setOpenDropdown: (value: boolean) => void; - sortData: (value: string) => void; -}) => { - return ( -
-
    - {sortedBy.map((option) => ( -
  • - -
  • - ))} -
-
- ); -}; diff --git a/web/leaderboard/src/app/components/Footer/Footer.module.scss b/web/leaderboard/src/app/components/Footer/Footer.module.scss deleted file mode 100644 index 4d30a6241..000000000 --- a/web/leaderboard/src/app/components/Footer/Footer.module.scss +++ /dev/null @@ -1,38 +0,0 @@ -@import "../../../styles/breakpoints"; - -.footer { - font-family: "Inter"; - font-weight: 400; - display: flex; - justify-content: space-between; - padding: 100px 64px 100px 64px; - z-index: 20; - position: relative; - - @include max-860px { - flex-direction: column; - gap: 30px; - } - - @include max-560px { - flex-direction: column; - padding: 50px 20px 50px 20px; - gap: 20px; - } - - .btns { - display: flex; - gap: 30px; - align-items: center; - - @include max-560px { - flex-direction: column; - align-items: flex-start; - gap: 10px; - } - - span { - border-bottom: 1px solid #838281; - } - } -} diff --git a/web/leaderboard/src/app/components/Footer/footer.cy.tsx b/web/leaderboard/src/app/components/Footer/footer.cy.tsx deleted file mode 100644 index 205efc206..000000000 --- a/web/leaderboard/src/app/components/Footer/footer.cy.tsx +++ /dev/null @@ -1,8 +0,0 @@ -import React from "react"; -import Footer from "./index"; - -describe("