Skip to content

Commit 1b75211

Browse files
committed
type
1 parent 118a988 commit 1b75211

17 files changed

+1176
-21
lines changed

package-lock.json

Lines changed: 48 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"axios": "^1.6.8",
2121
"class-variance-authority": "^0.7.0",
2222
"clsx": "^2.1.0",
23+
"framer-motion": "^11.1.7",
2324
"js-cookie": "^3.0.5",
2425
"lucide-react": "^0.350.0",
2526
"react": "^18.2.0",
@@ -31,10 +32,12 @@
3132
"react-router-dom": "^6.22.3",
3233
"tailwind-merge": "^2.2.1",
3334
"tailwindcss-animate": "^1.0.7",
35+
"tailwindcss-animated": "^1.0.1",
3436
"zod": "^3.22.4"
3537
},
3638
"devDependencies": {
3739
"@types/js-cookie": "^3.0.6",
40+
"@types/lodash": "^4.17.0",
3841
"@types/node": "^20.11.25",
3942
"@types/react": "^18.2.15",
4043
"@types/react-dom": "^18.2.7",
@@ -46,6 +49,7 @@
4649
"eslint-plugin-react-hooks": "^4.6.0",
4750
"eslint-plugin-react-refresh": "^0.4.3",
4851
"husky": "^9.0.11",
52+
"lodash": "^4.17.21",
4953
"postcss": "^8.4.27",
5054
"tailwindcss": "^3.3.3",
5155
"typescript": "^5.0.2",

src/App.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,22 @@ import Footer from "./components/Footer";
77
import { useDispatch } from "react-redux";
88
import { getUserInfo } from "./redux-store/slices/authSlice";
99
import { AppDispatch } from "./redux-store/store";
10+
import { motion, useScroll } from "framer-motion";
1011
import { getSubscriptionInfo } from "./redux-store/slices/subscriptionslice";
1112
function App() {
13+
const { scrollYProgress } = useScroll();
1214
const dispatch: AppDispatch = useDispatch();
15+
1316
useEffect(() => {
1417
dispatch(getUserInfo());
1518
dispatch(getSubscriptionInfo());
1619
}, [dispatch]);
1720
return (
1821
<div className="min-h-screen w-full ">
22+
<motion.div
23+
className="fixed top-0 left-0 right-0 h-[5px] bg-red-500 origin-left z-50"
24+
style={{ scaleX: scrollYProgress }}
25+
/>
1926
<Navbar />
2027
<ContentWrapper>
2128
<Outlet />

src/components/ContentWrapper.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1+
import clsx from "clsx";
12
import React from "react";
23
interface Props {
34
children: React.ReactNode;
5+
props?: string;
46
}
5-
const ContentWrapper: React.FC<Props> = ({ children }) => {
6-
return <div className="max-w-7xl mx-auto px-8 py-12 min-h-screen">{children}</div>;
7+
const ContentWrapper: React.FC<Props> = ({ children, props }) => {
8+
return (
9+
<div className={clsx("max-w-7xl mx-auto px-8 py-12 min-h-screen", props)}>
10+
{children}
11+
</div>
12+
);
713
};
814

915
export default ContentWrapper;

src/components/FadeAnimateWrapper.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import * as React from "react";
2+
3+
export default function FadeAnimate({
4+
children,
5+
}: {
6+
children: React.ReactNode;
7+
}) {
8+
return <div className="animate-fade-down">{children}</div>;
9+
}

src/components/OnBoarding/OnBoarding.tsx

Whitespace-only changes.

src/components/Typing/Control.tsx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import React from "react";
2+
3+
const Control = () => {
4+
return (
5+
<nav className="w-full flex flex-col gap-5 p-3 sm:flex-row sm:justify-between sm:p-5 shadow-2xl rounded-xl border-2 border-gray-400">
6+
<h1>TypeSight</h1>
7+
<div className="flex justify-end gap-5">
8+
<select className="px-3 rounded-xl bg-gray-200">
9+
<option>30s</option>
10+
<option>60s</option>
11+
</select>
12+
<select className="px-3 rounded-xl bg-gray-200">
13+
<option>words</option>
14+
<option>sentences</option>
15+
</select>
16+
</div>
17+
</nav>
18+
);
19+
};
20+
21+
export default Control;

src/components/Typing/Typing.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import React from "react";
2+
type TypeProps = {
3+
text: string;
4+
};
5+
const Typing = ({ text }: TypeProps) => {
6+
return <div>
7+
{text}
8+
</div>;
9+
};
10+
11+
export default Typing;

src/constant/typingconstant.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+

src/lib/data/sentences.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
[
2+
"She had some amazing news to share but nobody to share it with.",
3+
"The crowd yells and screams for more memes.",
4+
"She found his complete dullness interesting.",
5+
"The newly planted trees were held up by wooden frames in hopes they could survive the next storm.",
6+
"You can't compare apples and oranges, but what about bananas and plantains?",
7+
"He swore he just saw his sushi move.",
8+
"He found the chocolate covered roaches quite tasty.",
9+
"You have every right to be angry, but that doesn't give you the right to be mean.",
10+
"The delicious smell came from the array of food at the buffet.",
11+
"Brady met her gaze again, taking in the array of emotions crossing her features.",
12+
"The array of vegetables at the flea market fascinated Wren.",
13+
"If you go to the library, you will find books on an array of subjects.",
14+
"It was thought advisable for me to have my examinations in a room by myself, because the noise of the typewriter might disturb the other girls.",
15+
"I had made many mistakes, and Miss Sullivan had pointed them out again and again with gentle patience.",
16+
"Think how much worse you'd feel if the town you visualized really existed.",
17+
"It was always dangerous to drive with him since he insisted the safety cones were a slalom course.",
18+
"The blue parrot drove by the hitchhiking mongoose.",
19+
"If my calculator had a history, it would be more embarrassing than my browser history.",
20+
"All she wanted was the answer, but she had no idea how much she would hate it.",
21+
"In that instant, everything changed.",
22+
"He learned the important lesson that a picnic at the beach on a windy day is a bad idea.",
23+
"Potato wedges probably are not best for relationships.",
24+
"People who insist on picking their teeth with their elbows are so annoying!",
25+
"Whenever he saw a red flag warning at the beach he grabbed his surfboard.",
26+
"Various sea birds are elegant, but nothing is as elegant as a gliding pelican.",
27+
"The waves were crashing on the shore; it was a lovely sight.",
28+
"When she didn't like a guy who was trying to pick her up, she started using sign language.",
29+
"The hand sanitizer was actually clear glue.",
30+
"Jeanne wished she has chosen the red button.",
31+
"The river stole the gods.",
32+
"Greetings from the galaxy MACS0647-JD, or what we call home.",
33+
"Tuesdays are free if you bring a gnome costume.",
34+
"Car safety systems have come a long way, but he was out to prove they could be outsmarted.",
35+
"Thigh-high in the water, the fisherman's hope for dinner soon turned to despair.",
36+
"His confidence would have bee admirable if it wasn't for his stupidity.",
37+
"Some bathing suits just shouldn't be worn by some people.",
38+
"They got there early, and they got really good seats.",
39+
"He had unknowingly taken up sleepwalking as a nighttime hobby.",
40+
"When she didn't like a guy who was trying to pick her up, she started using sign language.",
41+
"She saw no irony asking me to change but wanting me to accept her for who she is.",
42+
"She wanted a pet platypus but ended up getting a duck and a ferret instead.",
43+
"Be careful with that butter knife.",
44+
"The beauty of the African sunset disguised the danger lurking nearby.",
45+
"The light in his life was actually a fire burning all around him.",
46+
"Random words in front of other random words create a random sentence.",
47+
"Red is greener than purple, for sure."
48+
]

0 commit comments

Comments
 (0)