Skip to content

Commit

Permalink
chore: code cleanup (#45)
Browse files Browse the repository at this point in the history
remove unused imports and add eslint rules
  • Loading branch information
heyJonBray authored Aug 8, 2024
1 parent c6801e4 commit ecf0679
Show file tree
Hide file tree
Showing 50 changed files with 729 additions and 843 deletions.
6 changes: 5 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{
"extends": "next/core-web-vitals"
"extends": "next/core-web-vitals",
"rules": {
"@next/next/no-img-element": "off",
"jsx-a11y/alt-text": "off"
}
}
51 changes: 21 additions & 30 deletions src/app/claim/page.js
Original file line number Diff line number Diff line change
@@ -1,37 +1,28 @@
"use client";
import Header from "@/components/Header";
import React from "react";
import Lottie from "react-lottie-player";
import lottieJson from "@/assets/animations/blue_planet.json";
import lottieJson2 from "@/assets/animations/planet_orbit1.json";
import TestNetCard from "@/components/guide/Testnet";
import { Image } from "@chakra-ui/react";
import ScrollCard from "@/components/guide/IntroCard";
import Deposit from "@/components/guide/Deposit";
import UseCases from "@/components/guide/UseCases";
import HowItWorks from "@/components/guide/HowItWorks";
import WhyOTC from "@/components/guide/WhyOTC";
import TokenTable from "@/components/testing/TokenTable";
import TokenDeposit from "@/components/testing/TokenDeposits";
import WriteHedges from "@/components/testing/WriteHedges";
import SoftwareVersions from "@/components/testing/Versions";
import { motion } from "framer-motion";
import Footer from "@/components/Footer";
'use client';
import lottieJson from '@/assets/animations/blue_planet.json';
import lottieJson2 from '@/assets/animations/planet_orbit1.json';
import Footer from '@/components/Footer';
import Header from '@/components/Header';
import TokenTable from '@/components/testing/TokenTable';
import WriteHedges from '@/components/testing/WriteHedges';
import { Image } from '@chakra-ui/react';
import { motion } from 'framer-motion';
import Lottie from 'react-lottie-player';

function Page() {
const glitchVariants = {
visible: {
textShadow: [
"1px 1px 0px lime",
"-1px -1px 0px purple",
"1px -1px 0px lime",
"-1px 1px 0px lime",
"2px 2px 2px lime",
'1px 1px 0px lime',
'-1px -1px 0px purple',
'1px -1px 0px lime',
'-1px 1px 0px lime',
'2px 2px 2px lime',
],
transition: {
duration: 0.2,
repeat: Infinity,
repeatType: "mirror",
repeatType: 'mirror',
},
},
};
Expand Down Expand Up @@ -164,10 +155,10 @@ function Page() {
// w={"100%"}

h={{
base: "150px",
md: "300px",
lg: "330px",
xl: "310px",
base: '150px',
md: '300px',
lg: '330px',
xl: '310px',
}}
alt="container"
className="relative hidden md:block ml-[-20px]"
Expand All @@ -184,7 +175,7 @@ function Page() {
animate="visible"
>
Token
</motion.span>{" "}
</motion.span>{' '}
Use Cases
</motion.p>
</div>
Expand Down
14 changes: 6 additions & 8 deletions src/app/dashboard/page.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
"use client";
import React from "react";
import Card from "@/components/Card";
import CenterNav from "@/components/dashboard/CenterNav";
import Footer from "@/components/Footer";
import Header from "@/components/Header";
import Layout from "@/components/dashboard/Layout";
import NoEvents from "@/components/NoEvents";
'use client';
import CenterNav from '@/components/dashboard/CenterNav';
import Layout from '@/components/dashboard/Layout';
import Footer from '@/components/Footer';
import Header from '@/components/Header';
import React from 'react';

export default function Dashboard() {
const [showPositions, setShowPositions] = React.useState(false);
Expand Down
33 changes: 16 additions & 17 deletions src/app/guide/page.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
"use client";
import Header from "@/components/Header";
import React from "react";
import Lottie from "react-lottie-player";
import lottieJson from "@/assets/animations/PE2.json";
import lottieJson2 from "@/assets/animations/planet_orbit1.json";
import TestNetCard from "@/components/guide/Testnet";
import { Image } from "@chakra-ui/react";
import ScrollCard from "@/components/guide/IntroCard";
import Deposit from "@/components/guide/Deposit";
import UseCases from "@/components/guide/UseCases";
import HowItWorks from "@/components/guide/HowItWorks";
import WhyOTC from "@/components/guide/WhyOTC";
import Footer from "@/components/Footer";
'use client';
import lottieJson from '@/assets/animations/PE2.json';
import lottieJson2 from '@/assets/animations/planet_orbit1.json';
import Footer from '@/components/Footer';
import Deposit from '@/components/guide/Deposit';
import HowItWorks from '@/components/guide/HowItWorks';
import ScrollCard from '@/components/guide/IntroCard';
import TestNetCard from '@/components/guide/Testnet';
import UseCases from '@/components/guide/UseCases';
import WhyOTC from '@/components/guide/WhyOTC';
import Header from '@/components/Header';
import { Image } from '@chakra-ui/react';
import Lottie from 'react-lottie-player';
function Page() {
return (
<>
Expand Down Expand Up @@ -59,9 +58,9 @@ function Page() {
src="/card-109.svg"
// w={"100%"}
h={{
base: "150px",
md: "200px",
lg: "155px",
base: '150px',
md: '200px',
lg: '155px',
}}
alt="container"
className="relative hidden md:block ml-[-20px]"
Expand Down
82 changes: 42 additions & 40 deletions src/app/page.js
Original file line number Diff line number Diff line change
@@ -1,51 +1,53 @@
"use client";
import Header from "@/components/Header";
import React from "react";
import Lottie from "react-lottie-player";
import lottieJson from "@/assets/animations/blue_planet.json";
import lottieJson2 from "@/assets/animations/planet_orbit1.json";
import {baseSepolia} from "thirdweb/chains";
import {Image} from "@chakra-ui/react";
'use client';
import lottieJson from '@/assets/animations/blue_planet.json';
import lottieJson2 from '@/assets/animations/planet_orbit1.json';
import Header from '@/components/Header';
import { Image } from '@chakra-ui/react';
import Lottie from 'react-lottie-player';
import { baseSepolia } from 'thirdweb/chains';

import TokenTable from "@/components/testing/TokenTable";
import TokenTable from '@/components/testing/TokenTable';

import WriteHedges from "@/components/testing/WriteHedges";
import WriteHedges from '@/components/testing/WriteHedges';

import {motion} from "framer-motion";
import Footer from "@/components/Footer";
import {useSwitchActiveWalletChain, useActiveWalletChain} from "thirdweb/react";
import Footer from '@/components/Footer';
import { motion } from 'framer-motion';
import {
useActiveWalletChain,
useSwitchActiveWalletChain,
} from 'thirdweb/react';

function Page() {
const activeChain = useActiveWalletChain();
const switchChain = useSwitchActiveWalletChain();
const glitchVariants = {
visible: {
textShadow: [
"1px 1px 0px lime",
"-1px -1px 0px purple",
"1px -1px 0px lime",
"-1px 1px 0px lime",
"2px 2px 2px lime",
'1px 1px 0px lime',
'-1px -1px 0px purple',
'1px -1px 0px lime',
'-1px 1px 0px lime',
'2px 2px 2px lime',
],
transition: {
duration: 0.2,
repeat: Infinity,
repeatType: "mirror",
repeatType: 'mirror',
},
},
};
const headingVariants = {
hidden: {opacity: 0, y: 20},
visible: {opacity: 1, y: 0},
hidden: { opacity: 0, y: 20 },
visible: { opacity: 1, y: 0 },
};
const containerVariants = {
hidden: {opacity: 0, y: 20},
visible: {opacity: 1, y: 0},
hidden: { opacity: 0, y: 20 },
visible: { opacity: 1, y: 0 },
};

const itemVariants = {
hidden: {opacity: 0, x: -20},
visible: {opacity: 1, x: 0},
hidden: { opacity: 0, x: -20 },
visible: { opacity: 1, x: 0 },
};

return (
Expand All @@ -59,7 +61,7 @@ function Page() {
initial="hidden"
animate="visible"
variants={headingVariants}
transition={{duration: 0.6}}
transition={{ duration: 0.6 }}
>
Xeon
</motion.h3>
Expand All @@ -68,7 +70,7 @@ function Page() {
initial="hidden"
animate="visible"
variants={headingVariants}
transition={{duration: 0.6, delay: 0.2}}
transition={{ duration: 0.6, delay: 0.2 }}
>
Testnet
</motion.h3>
Expand All @@ -77,7 +79,7 @@ function Page() {
initial="hidden"
animate="visible"
variants={headingVariants}
transition={{duration: 0.6, delay: 0.4}}
transition={{ duration: 0.6, delay: 0.4 }}
>
Guide
</motion.h3>
Expand Down Expand Up @@ -122,8 +124,8 @@ function Page() {
onClick={() => switchChain(baseSepolia)}
>
{activeChain?.id !== baseSepolia?.id
? "Connect"
: "Connected"}{" "}
? 'Connect'
: 'Connected'}{' '}
to Base Sepolia
</button>
</div>
Expand All @@ -133,23 +135,23 @@ function Page() {
initial="hidden"
animate="visible"
variants={containerVariants}
transition={{duration: 0.6}}
transition={{ duration: 0.6 }}
>
<motion.a
href="https://docs.xeon-protocol.io/documentation"
target="_blank"
rel="noopener noreferrer"
className="border-2 p-1 md:p-2 border-dashed border-light-purple rounded-md text-grey text-xs md:text-base"
variants={itemVariants}
transition={{duration: 0.6, delay: 0.2}}
transition={{ duration: 0.6, delay: 0.2 }}
>
Read Manual
</motion.a>
<motion.a
href="/guide"
className="border-2 p-1 md:p-2 border-dashed border-light-purple rounded-md text-grey text-xs md:text-base"
variants={itemVariants}
transition={{duration: 0.6, delay: 0.4}}
transition={{ duration: 0.6, delay: 0.4 }}
>
Jump to Guide Page
</motion.a>
Expand All @@ -159,7 +161,7 @@ function Page() {
rel="noopener noreferrer"
className="border-2 p-1 md:p-2 border-dashed border-light-purple rounded-md text-grey text-xs md:text-base"
variants={itemVariants}
transition={{duration: 0.6, delay: 0.6}}
transition={{ duration: 0.6, delay: 0.6 }}
>
Telegram Support
</motion.a>
Expand All @@ -168,7 +170,7 @@ function Page() {
initial="hidden"
animate="visible"
variants={containerVariants}
transition={{duration: 0.6, delay: 0.8}}
transition={{ duration: 0.6, delay: 0.8 }}
>
<p className="text-grey md:text-lg md:ml-[-20px] mt-5">{`{ Welcome to the Instruction Portal for the Neon Hedge test platform }`}</p>
</motion.div>
Expand All @@ -178,10 +180,10 @@ function Page() {
// w={"100%"}

h={{
base: "150px",
md: "300px",
lg: "330px",
xl: "360px",
base: '150px',
md: '300px',
lg: '330px',
xl: '360px',
}}
alt="container"
className="relative hidden md:block ml-[-30px]"
Expand All @@ -198,7 +200,7 @@ function Page() {
animate="visible"
>
Token
</motion.span>{" "}
</motion.span>{' '}
Use Cases
</motion.p>
</div>
Expand Down
26 changes: 12 additions & 14 deletions src/app/silkroad/page.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
"use client";
import React from "react";
import Card from "@/components/Card";
import CenterNav from "@/components/CenterNav";
import Footer from "@/components/Footer";
import Header from "@/components/Header";
import Layout from "@/components/Layout";
import NoEvents from "@/components/NoEvents";
import SocialPopup from "@/components/SocialPopup";
import ComingSoon from "@/components/ComingSoon";
import Head from "next/head";
'use client';
import Card from '@/components/Card';
import CenterNav from '@/components/CenterNav';
import Footer from '@/components/Footer';
import Header from '@/components/Header';
import Layout from '@/components/Layout';
import NoEvents from '@/components/NoEvents';
import SocialPopup from '@/components/SocialPopup';
import React from 'react';

import Loans from "@/components/Loans";
import Loans from '@/components/Loans';

export default function Home() {
const [showPositions, setShowPositions] = React.useState(false);
const [showDiscover, setShowDiscover] = React.useState(true);
const [showBookmarks, setShowBookmarks] = React.useState(false);
const [showSocials, setShowSocials] = React.useState(false);
const [showComingSoon, setShowComingSoon] = React.useState(false);
const [activeSideTab, setActiveSideTab] = React.useState("");
const [activeSection, setActiveSection] = React.useState("discover");
const [activeSideTab, setActiveSideTab] = React.useState('');
const [activeSection, setActiveSection] = React.useState('discover');

const [showLoans, setShowLoans] = React.useState(false);

Expand Down
17 changes: 8 additions & 9 deletions src/app/wallet/page.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import Footer from "@/components/Footer";
import Header from "@/components/Header";
import UnderConstruction from "@/components/UnderConstruction";
import HedgesPanel from "@/components/wallet/HedgesPanel";
import DashboardSection from "@/components/wallet/RewardsPanel";
import StakingPanel from "@/components/wallet/Staking";
import UserAssets from "@/components/wallet/UserAssets";
import VaultBalances from "@/components/wallet/VaultBalances";
import React from "react";
import Footer from '@/components/Footer';
import Header from '@/components/Header';
import UnderConstruction from '@/components/UnderConstruction';
import HedgesPanel from '@/components/wallet/HedgesPanel';
import DashboardSection from '@/components/wallet/RewardsPanel';
import StakingPanel from '@/components/wallet/Staking';
import UserAssets from '@/components/wallet/UserAssets';
import VaultBalances from '@/components/wallet/VaultBalances';

function Page() {
return (
Expand Down
Loading

0 comments on commit ecf0679

Please sign in to comment.