From 49542dd33ed00980c81a2217a12eb49ecf5d4670 Mon Sep 17 00:00:00 2001 From: ShinichiShi Date: Sat, 23 Nov 2024 01:37:08 +0530 Subject: [PATCH 1/2] remove prev commit files..and packages --- components/magicui/animated-list.tsx | 59 -------------------- components/ui/AnimatedList.tsx | 82 ---------------------------- package-lock.json | 20 ------- package.json | 1 - 4 files changed, 162 deletions(-) delete mode 100644 components/magicui/animated-list.tsx delete mode 100644 components/ui/AnimatedList.tsx diff --git a/components/magicui/animated-list.tsx b/components/magicui/animated-list.tsx deleted file mode 100644 index 4f045d8..0000000 --- a/components/magicui/animated-list.tsx +++ /dev/null @@ -1,59 +0,0 @@ -"use client"; - -import React, { ReactElement, useEffect, useMemo, useState } from "react"; -import { AnimatePresence, motion } from "framer-motion"; - -export interface AnimatedListProps { - className?: string; - children: React.ReactNode; - delay?: number; -} - -export const AnimatedList = React.memo( - ({ className, children, delay = 1000 }: AnimatedListProps) => { - const [index, setIndex] = useState(0); - const childrenArray = React.Children.toArray(children); - - useEffect(() => { - const interval = setInterval(() => { - setIndex((prevIndex) => (prevIndex + 1) % childrenArray.length); - }, delay); - - return () => clearInterval(interval); - }, [childrenArray.length, delay]); - - const itemsToShow = useMemo( - () => childrenArray.slice(0, index + 1).reverse(), - [index, childrenArray], - ); - - return ( -
- - {itemsToShow.map((item) => ( - - {item} - - ))} - -
- ); - }, -); - -AnimatedList.displayName = "AnimatedList"; - -export function AnimatedListItem({ children }: { children: React.ReactNode }) { - const animations = { - initial: { scale: 0, opacity: 0 }, - animate: { scale: 1, opacity: 1, originY: 0 }, - exit: { scale: 0, opacity: 0 }, - transition: { type: "spring", stiffness: 350, damping: 40 }, - }; - - return ( - - {children} - - ); -} diff --git a/components/ui/AnimatedList.tsx b/components/ui/AnimatedList.tsx deleted file mode 100644 index 58f86a9..0000000 --- a/components/ui/AnimatedList.tsx +++ /dev/null @@ -1,82 +0,0 @@ -"use client"; - -import { cn } from "@/lib/server/utils"; -import { AnimatedList } from "@/components/magicui/animated-list"; -import { notificationData } from "../achievementList"; -import Image from 'next/image' -interface Item { - name: string; - description: string; - icon: string; - time: string; -} -const Notification = ({ name, description, icon, time }: Item) => { - return ( -
-
-
- icpc -
-
-
- {name} - · - {time} -
-

- {description} -

-
-
-
- ); -}; - -interface AnimatedListDemoProps { - className?: string; - type?: 'gsoc' | 'lfx' | 'icpc' | 'sih'; - repeatCount?: number; -} - -export function AnimatedListDemo({ - className, - type = 'gsoc', - repeatCount = 10, -}: AnimatedListDemoProps) { - const selected = notificationData[type]; - - const repeatedNotifications = Array.from( - { length: repeatCount }, - () => selected - ).flat(); - - return ( -
- - {repeatedNotifications.map((item, idx) => ( - - ))} - -
- ); -} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index efc3298..2e0fab2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -44,7 +44,6 @@ "react-spinners": "^0.14.1", "react-spring": "^9.7.4", "sharp": "^0.33.5", - "swiper": "^11.1.14", "tailwind-merge": "^2.5.4", "tailwindcss-animate": "^1.0.7", "typescript": "^5.3.3", @@ -16568,25 +16567,6 @@ "react": ">=17.0" } }, - "node_modules/swiper": { - "version": "11.1.14", - "resolved": "https://registry.npmjs.org/swiper/-/swiper-11.1.14.tgz", - "integrity": "sha512-VbQLQXC04io6AoAjIUWuZwW4MSYozkcP9KjLdrsG/00Q/yiwvhz9RQyt0nHXV10hi9NVnDNy1/wv7Dzq1lkOCQ==", - "funding": [ - { - "type": "patreon", - "url": "https://www.patreon.com/swiperjs" - }, - { - "type": "open_collective", - "url": "http://opencollective.com/swiper" - } - ], - "license": "MIT", - "engines": { - "node": ">= 4.7.0" - } - }, "node_modules/tailwind-merge": { "version": "2.5.4", "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-2.5.4.tgz", diff --git a/package.json b/package.json index cd7c0f3..680a9cb 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,6 @@ "react-spinners": "^0.14.1", "react-spring": "^9.7.4", "sharp": "^0.33.5", - "swiper": "^11.1.14", "tailwind-merge": "^2.5.4", "tailwindcss-animate": "^1.0.7", "typescript": "^5.3.3", From 6ffb62842bef0645d4c3738e49d4872acd7436a6 Mon Sep 17 00:00:00 2001 From: ShinichiShi Date: Sat, 23 Nov 2024 02:13:21 +0530 Subject: [PATCH 2/2] fix conflict with main --- components/achievements.tsx | 10 ++-- components/magicui/animated-list.tsx | 59 -------------------- components/ui/AnimatedList.tsx | 82 ---------------------------- package-lock.json | 20 ------- package.json | 1 - 5 files changed, 5 insertions(+), 167 deletions(-) delete mode 100644 components/magicui/animated-list.tsx delete mode 100644 components/ui/AnimatedList.tsx diff --git a/components/achievements.tsx b/components/achievements.tsx index 688a4f8..eda11af 100644 --- a/components/achievements.tsx +++ b/components/achievements.tsx @@ -6,7 +6,7 @@ import Marquee from "@/components/magicui/marquee"; import { achievementJson } from "./achievementList"; import Image from 'next/image' -const ReviewCard = ({ +const Tile = ({ img, name, username, @@ -50,13 +50,13 @@ function Achievements() { - {firstRow.map((review) => ( - + {firstRow.map((section) => ( + ))} - {secondRow.map((review) => ( - + {secondRow.map((section) => ( + ))} diff --git a/components/magicui/animated-list.tsx b/components/magicui/animated-list.tsx deleted file mode 100644 index 4f045d8..0000000 --- a/components/magicui/animated-list.tsx +++ /dev/null @@ -1,59 +0,0 @@ -"use client"; - -import React, { ReactElement, useEffect, useMemo, useState } from "react"; -import { AnimatePresence, motion } from "framer-motion"; - -export interface AnimatedListProps { - className?: string; - children: React.ReactNode; - delay?: number; -} - -export const AnimatedList = React.memo( - ({ className, children, delay = 1000 }: AnimatedListProps) => { - const [index, setIndex] = useState(0); - const childrenArray = React.Children.toArray(children); - - useEffect(() => { - const interval = setInterval(() => { - setIndex((prevIndex) => (prevIndex + 1) % childrenArray.length); - }, delay); - - return () => clearInterval(interval); - }, [childrenArray.length, delay]); - - const itemsToShow = useMemo( - () => childrenArray.slice(0, index + 1).reverse(), - [index, childrenArray], - ); - - return ( -
- - {itemsToShow.map((item) => ( - - {item} - - ))} - -
- ); - }, -); - -AnimatedList.displayName = "AnimatedList"; - -export function AnimatedListItem({ children }: { children: React.ReactNode }) { - const animations = { - initial: { scale: 0, opacity: 0 }, - animate: { scale: 1, opacity: 1, originY: 0 }, - exit: { scale: 0, opacity: 0 }, - transition: { type: "spring", stiffness: 350, damping: 40 }, - }; - - return ( - - {children} - - ); -} diff --git a/components/ui/AnimatedList.tsx b/components/ui/AnimatedList.tsx deleted file mode 100644 index 58f86a9..0000000 --- a/components/ui/AnimatedList.tsx +++ /dev/null @@ -1,82 +0,0 @@ -"use client"; - -import { cn } from "@/lib/server/utils"; -import { AnimatedList } from "@/components/magicui/animated-list"; -import { notificationData } from "../achievementList"; -import Image from 'next/image' -interface Item { - name: string; - description: string; - icon: string; - time: string; -} -const Notification = ({ name, description, icon, time }: Item) => { - return ( -
-
-
- icpc -
-
-
- {name} - · - {time} -
-

- {description} -

-
-
-
- ); -}; - -interface AnimatedListDemoProps { - className?: string; - type?: 'gsoc' | 'lfx' | 'icpc' | 'sih'; - repeatCount?: number; -} - -export function AnimatedListDemo({ - className, - type = 'gsoc', - repeatCount = 10, -}: AnimatedListDemoProps) { - const selected = notificationData[type]; - - const repeatedNotifications = Array.from( - { length: repeatCount }, - () => selected - ).flat(); - - return ( -
- - {repeatedNotifications.map((item, idx) => ( - - ))} - -
- ); -} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index efc3298..2e0fab2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -44,7 +44,6 @@ "react-spinners": "^0.14.1", "react-spring": "^9.7.4", "sharp": "^0.33.5", - "swiper": "^11.1.14", "tailwind-merge": "^2.5.4", "tailwindcss-animate": "^1.0.7", "typescript": "^5.3.3", @@ -16568,25 +16567,6 @@ "react": ">=17.0" } }, - "node_modules/swiper": { - "version": "11.1.14", - "resolved": "https://registry.npmjs.org/swiper/-/swiper-11.1.14.tgz", - "integrity": "sha512-VbQLQXC04io6AoAjIUWuZwW4MSYozkcP9KjLdrsG/00Q/yiwvhz9RQyt0nHXV10hi9NVnDNy1/wv7Dzq1lkOCQ==", - "funding": [ - { - "type": "patreon", - "url": "https://www.patreon.com/swiperjs" - }, - { - "type": "open_collective", - "url": "http://opencollective.com/swiper" - } - ], - "license": "MIT", - "engines": { - "node": ">= 4.7.0" - } - }, "node_modules/tailwind-merge": { "version": "2.5.4", "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-2.5.4.tgz", diff --git a/package.json b/package.json index cd7c0f3..680a9cb 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,6 @@ "react-spinners": "^0.14.1", "react-spring": "^9.7.4", "sharp": "^0.33.5", - "swiper": "^11.1.14", "tailwind-merge": "^2.5.4", "tailwindcss-animate": "^1.0.7", "typescript": "^5.3.3",