Skip to content

Commit

Permalink
feat: archive added
Browse files Browse the repository at this point in the history
  • Loading branch information
C-NikhilKarthik committed Nov 16, 2023
1 parent 5dfa36c commit 9f073ed
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
5 changes: 0 additions & 5 deletions src/app/archive/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,12 @@
import React, { useState, useEffect, useRef } from "react";
import { motion, useInView, useAnimation } from "framer-motion";
import { BsCode } from "react-icons/bs";
import Intro from "../../components/Intro";
import Navbar from "../../components/Navbar";
import { FiGithub, FiLinkedin, FiCodepen } from "react-icons/fi";
import About from "../../components/About";
import Projects from "../../components/Projects";
import Footer from "../../components/Footer";
import { RxCross2 } from "react-icons/rx";
import DrawerButtons from "../../components/DrawerButtons";
import Image from "next/image";
import Reveal from "@/components/Reveal";
import Link from "next/link";
import Archive from "@/components/Archive";

function Home() {
Expand Down
16 changes: 8 additions & 8 deletions src/components/Archive.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";
import React, { useState, useEffect, useRef } from "react";
import { motion, useInView, useAnimation } from "framer-motion";
// import { motion, useInView, useAnimation } from "framer-motion";
import { FiExternalLink, FiGithub } from "react-icons/fi";

import { BsCode } from "react-icons/bs";
Expand All @@ -9,16 +9,16 @@ import Reveal from "./Reveal";
import Project from "./Archives";
function Archive() {
const ref = useRef(null);
const mainControls = useAnimation();
const inView = useInView(ref, { once: true });
// const mainControls = useAnimation();
// const inView = useInView(ref, { once: true });

const sortedProjects = Project.sort((a, b) => b.Year - a.Year);

useEffect(() => {
if (inView) {
mainControls.start("visible");
} else mainControls.set("hidden");
}, [inView]);
// useEffect(() => {
// if (inView) {
// mainControls.start("visible");
// } else mainControls.set("hidden");
// }, [inView]);
return (
<div id="about" className="text-gray-400 w-full">
<h2 className="whitespace-nowrap flex items-center text-[clamp(40px,8vw,72px)] font-semibold">
Expand Down

0 comments on commit 9f073ed

Please sign in to comment.