File tree Expand file tree Collapse file tree 6 files changed +60
-8
lines changed
Expand file tree Collapse file tree 6 files changed +60
-8
lines changed Original file line number Diff line number Diff line change 1313 "ogl" : " ^1.0.11" ,
1414 "prettier" : " ^3.5.3" ,
1515 "react" : " ^19.0.0" ,
16- "react-dom" : " ^19.0.0"
16+ "react-dom" : " ^19.0.0" ,
17+ "use-scramble" : " ^2.2.15"
1718 },
1819 "devDependencies" : {
1920 "@eslint/eslintrc" : " ^3" ,
Original file line number Diff line number Diff line change 11import { HeroASCII } from "@/components/hero" ;
2+ import { Metadata } from "next" ;
3+
4+ export const metadata : Metadata = {
5+ title : "Home" ,
6+ description : "Home"
7+ } ;
28
39export default function Home ( ) {
410 return (
Original file line number Diff line number Diff line change 11import SpiralLogo from "@/assets/spiral.svg" ;
22import Image from "next/image" ;
3- import Link from "next/link" ;
4-
3+ import NextLink from "next/link" ;
4+ import { Link } from "../link" ;
55export const Footer = ( ) => {
66 return (
77 < div className = "flex flex-col-reverse md:flex-row justify-between items-center m-4 dashed-top dashed-bottom after:hidden md:after:block md:h-[84px]" >
@@ -15,14 +15,17 @@ export const Footer = () => {
1515 < div className = "flex items-center gap-8 dashed-left before:hidden lg:before:block h-full lg:px-10" >
1616 < div className = "flex flex-col md:flex-row items-center gap-2 py-8 md:py-0" >
1717 < span className = "text-white font-mono text-sm flex gap-4" >
18- < Link href = "/" className = "uppercase text-white font-mono text-sm" >
18+ < NextLink
19+ href = "/"
20+ className = "uppercase text-white font-mono text-sm"
21+ >
1922 < Image
2023 src = { SpiralLogo }
2124 alt = "Spiral Logo"
2225 width = { 15 }
2326 height = { 18 }
2427 />
25- </ Link >
28+ </ NextLink >
2629 < span >
2730 Made by < Link href = "https://spiraldb.com" > Spiral</ Link > .
2831 </ span >
Original file line number Diff line number Diff line change 11import Logo from "@/assets/logo.svg" ;
22import Image from "next/image" ;
3- import Link from "next/link" ;
3+ import NextLink from "next/link" ;
4+ import { Link } from "../link" ;
45
56export const Header = ( ) => {
67 return (
78 < div className = "flex justify-between items-center m-4 mb-2 dashed-top dashed-bottom h-[108px]" >
8- < Link
9+ < NextLink
910 href = "/"
1011 className = "flex items-center gap-4 dashed-right h-full px-8"
1112 >
1213 < Image src = { Logo } alt = "Logo" width = { 44 } height = { 44 } />
1314 < h1 className = "text-4xl font-funnel text-white hidden md:inline-block" >
1415 Vortex
1516 </ h1 >
16- </ Link >
17+ </ NextLink >
1718 < div className = "flex items-center gap-8 flex-1 justify-end md:flex-none dashed-left before:hidden md:before:block h-full px-10" >
1819 < Link
1920 href = "/"
Original file line number Diff line number Diff line change 1+ "use client" ;
2+
3+ import NextLink from "next/link" ;
4+ import { useScramble } from "use-scramble" ;
5+
6+ interface LinkProps extends React . ComponentProps < typeof NextLink > {
7+ children : string ;
8+ }
9+
10+ export const Link = ( { href, children, ...props } : LinkProps ) => {
11+ const { ref, replay } = useScramble ( {
12+ text : children ,
13+ speed : 0.5 ,
14+ tick : 1 ,
15+ step : 1 ,
16+ scramble : 4 ,
17+ seed : 0 ,
18+ playOnMount : false
19+ } ) ;
20+
21+ return (
22+ < NextLink href = { href } ref = { ref } onMouseOver = { replay } { ...props } >
23+ { children }
24+ </ NextLink >
25+ ) ;
26+ } ;
You can’t perform that action at this time.
0 commit comments