From 65d51f5110ae6eb5cc0404d865d746b4abb5f1f5 Mon Sep 17 00:00:00 2001
From: Muthu Kumar
Date: Thu, 10 Apr 2025 12:41:12 +0530
Subject: [PATCH] feat: use AnimateEntry more
---
src/pages/main/Exp.tsx | 24 +++++++++++++++---------
src/pages/main/Work.tsx | 10 ++++++----
2 files changed, 21 insertions(+), 13 deletions(-)
diff --git a/src/pages/main/Exp.tsx b/src/pages/main/Exp.tsx
index 801f704..7e0489f 100644
--- a/src/pages/main/Exp.tsx
+++ b/src/pages/main/Exp.tsx
@@ -1,4 +1,4 @@
-import React, { useEffect } from "react";
+import React, { useEffect, useState } from "react";
import { css, cx } from "@emotion/css";
import { ExpUnit } from "../../components/Exp/Unit";
import { age, experience } from "./data/experience";
@@ -6,6 +6,7 @@ import { offscreenWidth } from "../../components/constants";
import { Tags } from "../../components/Exp/Tags";
import useSearchParams from "../../util/useSearchParams";
import useLocation from "wouter/use-location";
+import { AnimateEntry } from "../../components/AnimateEntry";
const exp_route = /^\/experience\/?[^\/]*$/;
const slug_replace = /^\/experience\/?/;
@@ -13,6 +14,11 @@ const slug_replace = /^\/experience\/?/;
const Exp: React.FC = () => {
const [location, navigate] = useLocation();
const tags = useSearchParams("tag");
+ const [entryDelay, setEntryDelay] = useState(true);
+
+ useEffect(() => {
+ if (tags.size) setEntryDelay(false);
+ }, [tags]);
if (!exp_route.test(location)) {
navigate("/experience", { replace: true });
@@ -51,13 +57,13 @@ const Exp: React.FC = () => {
:
-
-
+ {
}}
/>
))}
-
+
>
);
};
diff --git a/src/pages/main/Work.tsx b/src/pages/main/Work.tsx
index a55c502..cf4007e 100644
--- a/src/pages/main/Work.tsx
+++ b/src/pages/main/Work.tsx
@@ -1,6 +1,7 @@
import React from "react";
import { css, cx } from "@emotion/css";
import { otherProjects, projects, type Project } from "./data/project";
+import { AnimateEntry } from "../../components/AnimateEntry";
const styles = {
project: css`
@@ -140,7 +141,8 @@ const Exp: React.FC = () => {
<>
Things I've built
A few projects I'm proud of:
- {
{projects.map(unit => (
))}
-
+
Apart from the above, I've also built some other interesting stuff over
@@ -163,7 +165,7 @@ const Exp: React.FC = () => {
Description |
-
+
{otherProjects.map(unit => (
{
|
))}
-
+
>
);