Skip to content

Commit

Permalink
fix: add typing effect
Browse files Browse the repository at this point in the history
  • Loading branch information
JimmyLv committed Mar 5, 2023
1 parent af1e57d commit 98f6aa7
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 6 deletions.
1 change: 0 additions & 1 deletion components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import React from "react";
import SignIn from "~/components/SignIn";
import { BASE_DOMAIN } from "~/utils/constants";
import Github from "../components/GitHub";

const poppins = Poppins({ weight: "800", subsets: ["latin"] });

export default function Header() {
Expand Down
17 changes: 17 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"react": "18.2.0",
"react-dom": "18.2.0",
"react-hot-toast": "^2.4.0",
"react-type-animation": "^2.1.2",
"react-use": "^17.4.0",
"react-use-measure": "^2.1.1",
"tailwind-merge": "^1.10.0",
Expand Down
29 changes: 24 additions & 5 deletions pages/[...slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ import { useLocalStorage } from "react-use";
import { useToast } from "~/hooks/use-toast";
import Sentence from "../components/Sentence";
import SquigglyLines from "../components/SquigglyLines";
import { useSummarize } from "../hooks/useSummarize";
import { CHECKOUT_URL } from "../utils/constants";
import { extractTimestamp } from "../utils/extractTimestamp";
import { useSummarize } from "~/hooks/useSummarize";
import { CHECKOUT_URL } from "~/utils/constants";
import { extractTimestamp } from "~/utils/extractTimestamp";
import { TypeAnimation } from "react-type-animation";

let isSecureContext = false;

Expand Down Expand Up @@ -139,9 +140,27 @@ export const Home: NextPage = () => {
</a>
<h1 className="max-w-5xl text-center text-4xl font-bold sm:text-7xl">
一键总结{" "}
<span className="relative whitespace-nowrap text-[#3290EE]">
<span className="relative whitespace-nowrap text-pink-400">
<SquigglyLines />
<span className="relative text-pink-400 ">哔哩哔哩</span>
<TypeAnimation
sequence={[
"哔哩哔哩",
2000,
"YouTube",
2000,
"播客",
2000,
"会议",
3000,
() => {
console.log("Done typing!"); // Place optional callbacks anywhere in the array
},
]}
wrapper="span"
cursor={true}
repeat={Infinity}
className="relative text-pink-400 "
/>
</span>{" "}
视频内容 <br />
<div className="mt-4">Powered by GPT-3.5 AI</div>
Expand Down

1 comment on commit 98f6aa7

@vercel
Copy link

@vercel vercel bot commented on 98f6aa7 Mar 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.