mirror of
https://github.com/0xShay/ticketchain.git
synced 2026-01-11 13:13:25 +00:00
Front end is Good
This commit is contained in:
@@ -3,29 +3,38 @@ import React, { useState } from 'react';
|
||||
import Link from 'next/link';
|
||||
|
||||
const Header = () => {
|
||||
const [mouseX, setMouseX] = useState(0);
|
||||
const [mouseY, setMouseY] = useState(0);
|
||||
const [mouseX, setMouseX] = useState(-1);
|
||||
const [mouseY, setMouseY] = useState(-1);
|
||||
|
||||
const handleMouseMove = (e: React.MouseEvent<HTMLDivElement>) => {
|
||||
setMouseX(e.clientX);
|
||||
setMouseY(e.clientY);
|
||||
};
|
||||
|
||||
const handleMouseLeave = () => {
|
||||
setMouseX(-1);
|
||||
setMouseY(-1);
|
||||
};
|
||||
|
||||
return (
|
||||
<div
|
||||
className="fixed top-0 left-0 right-0 backdrop-blur-md bg-opacity-60 z-50"
|
||||
onMouseMove={handleMouseMove}
|
||||
onMouseLeave={handleMouseLeave}
|
||||
>
|
||||
<div
|
||||
className="absolute inset-0 pointer-events-none"
|
||||
style={{
|
||||
border: '1px solid transparent',
|
||||
background: `radial-gradient(circle at ${mouseX}px ${mouseY}px, rgba(255, 255, 255, 0.4), transparent 20%)`,
|
||||
background:
|
||||
mouseX >= 0 && mouseY >= 0
|
||||
? `radial-gradient(circle at ${mouseX}px ${mouseY}px, rgba(255, 255, 255, 0.4), transparent 20%)`
|
||||
: 'none',
|
||||
backgroundClip: 'padding-box, border-box',
|
||||
}}
|
||||
></div>
|
||||
<div className="container mx-auto px-6 py-5 flex justify-between items-center">
|
||||
<h1 className="text-2xl font-bold text-white">Ticket Chain</h1>
|
||||
<div className="container mx-auto px-6 py-4 flex justify-between items-center">
|
||||
<h1 className="text-2xl font-Ariel-bold text-white">TicketChain</h1>
|
||||
<nav className="nav">
|
||||
<ul className="flex space-x-6">
|
||||
<li>
|
||||
@@ -36,11 +45,10 @@ const Header = () => {
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link
|
||||
href="/TicketListings"
|
||||
className="text-white hover:text-blue-500 transition-colors duration-300"
|
||||
>
|
||||
Events
|
||||
<Link href="/TicketListings" legacyBehavior>
|
||||
<a className="text-white hover:text-blue-500 transition-colors duration-300">
|
||||
Events
|
||||
</a>
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
|
||||
Reference in New Issue
Block a user