Skip to content

Commit

Permalink
Update Heading.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
iancheung0202 authored Dec 11, 2024
1 parent 0c2e860 commit d9640a5
Showing 1 changed file with 8 additions and 56 deletions.
64 changes: 8 additions & 56 deletions src/app/(landing)/Heading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,31 +27,6 @@ const msToTime = (time: number) => {
return parts.join(', ');
};

const RegisterLink = () => {
useEffect(() => {
const timer = setTimeout(() => {
const link = document.getElementById("register-link");
if (link) {
link.classList.add("wobble");
}
}, 4000);

return () => clearTimeout(timer);
}, []);

return (
<a
id="register-link"
href="https://docs.google.com/forms/d/e/1FAIpQLScVPB66QN6VdTLCzdj91xYIkH0RGDLeJ_gAU7V6TYRIrG1dRw/viewform"
rel="noopener noreferrer"
target="_blank"
className="wobble"
>
Register Here
</a>
);
};

export default function Heading() {
const [time, setTime] = useState<null | number>(null);
const START = new Date('2025-01-25T15:00:00').getTime();
Expand Down Expand Up @@ -100,42 +75,19 @@ export default function Heading() {
</div>
<div className="text-4xl font-bold mt-3 flex gap-2 items-center">
<span className="text-[#F47722] text-5xl">[</span>
<RegisterLink />
<a
id="register-link"
href="https://docs.google.com/forms/d/e/1FAIpQLScVPB66QN6VdTLCzdj91xYIkH0RGDLeJ_gAU7V6TYRIrG1dRw/viewform"
rel="noopener noreferrer"
target="_blank"
>
Register Here
</a>
<span className="text-[#F47722] text-5xl">]</span>
<span className="text-5xl animate-wiggle ml-2">👈</span>
</div>

<style jsx>{`
@keyframes wobble {
0% {
transform: none;
}
15% {
transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg);
}
30% {
transform: translate3d(12%, 0, 0) rotate3d(0, 0, 1, 2deg);
}
45% {
transform: translate3d(-10%, 0, 0) rotate3d(0, 0, 1, -2deg);
}
60% {
transform: translate3d(8%, 0, 0) rotate3d(0, 0, 1, 1deg);
}
75% {
transform: translate3d(-4%, 0, 0) rotate3d(0, 0, 1, -1deg);
}
100% {
transform: none;
}
}
.wobble {
display: inline-block;
animation: wobble 0.8s linear infinite;
transform-origin: 50% 100%;
}
@keyframes wiggle {
0% {
transform: translateX(0);
Expand Down

1 comment on commit d9640a5

@github-actions
Copy link

Choose a reason for hiding this comment

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

Deploy preview for gunnhacks11-0 ready!

✅ Preview
https://gunnhacks11-0-61wm4zedq-daniel-kous-projects.vercel.app

Built with commit d9640a5.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.