mirror of
https://github.com/0xShay/ticketchain.git
synced 2026-01-11 21:23:24 +00:00
merging changes with initial branch
This commit is contained in:
53
app/Home.tsx
53
app/Home.tsx
@@ -1,45 +1,36 @@
|
||||
import Header from '../components/custom/header';
|
||||
import Footer from '../components/custom/footer';
|
||||
import Test from '../components/scripts/Test';
|
||||
import MetaMask from '../components/scripts/MetaMask';
|
||||
|
||||
export default function Home() {
|
||||
return (
|
||||
<div className="container">
|
||||
<header className="header">
|
||||
<title>Event Chain</title>
|
||||
<h1 className="text-8xl text-center text-blue-700" >Ticket Chain</h1>
|
||||
<nav className="nav">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="/">Home</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/events">Events</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/contact">Contact</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<input
|
||||
type="text"
|
||||
placeholder="Search events..."
|
||||
className="search-bar"
|
||||
/>
|
||||
</header>
|
||||
<div className="container mx-auto p-4">
|
||||
<div>
|
||||
<Header />
|
||||
{/* Other page content */}
|
||||
</div>
|
||||
<main>
|
||||
<section>
|
||||
<h2>Featured Events</h2>
|
||||
<p>No events available at the moment.</p>
|
||||
<section className="mb-8">
|
||||
<h2 className="text-2xl font-semibold mb-4">Featured Events</h2>
|
||||
<p className="text-gray-600">No events available at the moment.</p>
|
||||
</section>
|
||||
<section>
|
||||
<h2>Upcoming Events</h2>
|
||||
<ul>
|
||||
<h2 className="text-2xl font-semibold mb-4">Upcoming Events</h2>
|
||||
<ul className="list-disc list-inside">
|
||||
<li>Event 1 - Date</li>
|
||||
<li>Event 2 - Date</li>
|
||||
<li>Event 3 - Date</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section className="mb-8">
|
||||
<Test />
|
||||
</section>
|
||||
<section className="mb-8">
|
||||
<MetaMask />
|
||||
</section>
|
||||
<Footer />
|
||||
</main>
|
||||
<footer>
|
||||
<p>© 2024 Ticket Chain. All rights reserved.</p>
|
||||
</footer>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
0
app/TicketListings.tsx
Normal file
0
app/TicketListings.tsx
Normal file
@@ -1,21 +1,26 @@
|
||||
import type { Metadata } from 'next';
|
||||
import localFont from 'next/font/local';
|
||||
// import localFont from 'next/font/local';
|
||||
import './globals.css';
|
||||
|
||||
const geistSans = localFont({
|
||||
src: './fonts/GeistVF.woff',
|
||||
variable: '--font-geist-sans',
|
||||
weight: '100 900',
|
||||
});
|
||||
const geistMono = localFont({
|
||||
src: './fonts/GeistMonoVF.woff',
|
||||
variable: '--font-geist-mono',
|
||||
weight: '100 900',
|
||||
});
|
||||
import { Inter } from 'next/font/google';
|
||||
import './globals.css';
|
||||
|
||||
const inter = Inter({ subsets: ['latin'] });
|
||||
|
||||
// const geistSans = localFont({
|
||||
// src: './fonts/GeistVF.woff',
|
||||
// variable: '--font-geist-sans',
|
||||
// weight: '100 900',
|
||||
// });
|
||||
// const geistMono = localFont({
|
||||
// src: './fonts/GeistMonoVF.woff',
|
||||
// variable: '--font-geist-mono',
|
||||
// weight: '100 900',
|
||||
// });
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'Create Next App',
|
||||
description: 'Generated by create next app',
|
||||
title: 'Ticket Chain',
|
||||
description: 'A blockchain-based ticketing system.',
|
||||
};
|
||||
|
||||
export default function RootLayout({
|
||||
@@ -25,11 +30,7 @@ export default function RootLayout({
|
||||
}>) {
|
||||
return (
|
||||
<html lang="en">
|
||||
<body
|
||||
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
|
||||
>
|
||||
{children}
|
||||
</body>
|
||||
<body className={inter.className}>{children}</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
|
||||
10
app/page.tsx
10
app/page.tsx
@@ -1,6 +1,10 @@
|
||||
import EventDescription from '@/components/custom/EventDescription';
|
||||
import Home from './Home';
|
||||
import ConfirmationTicket from '@/components/Confirmation';
|
||||
import Profile from '@/components/Profile';
|
||||
|
||||
export default function Page() {}
|
||||
export default function Page() {
|
||||
return (
|
||||
<>
|
||||
<Home />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
12
components/custom/footer.tsx
Normal file
12
components/custom/footer.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import React from 'react';
|
||||
|
||||
const Footer = () => {
|
||||
return (
|
||||
<footer className="text-center mt-8">
|
||||
<p className="text-gray-500">
|
||||
© 2024 Ticket Chain. All rights reserved.
|
||||
</p>
|
||||
</footer>
|
||||
);
|
||||
};
|
||||
export default Footer;
|
||||
64
components/custom/header.tsx
Normal file
64
components/custom/header.tsx
Normal file
@@ -0,0 +1,64 @@
|
||||
'use client';
|
||||
import React, { useState } from 'react';
|
||||
import Link from 'next/link';
|
||||
|
||||
const Header = () => {
|
||||
const [mouseX, setMouseX] = useState(0);
|
||||
const [mouseY, setMouseY] = useState(0);
|
||||
|
||||
const handleMouseMove = (e: React.MouseEvent<HTMLDivElement>) => {
|
||||
setMouseX(e.clientX);
|
||||
setMouseY(e.clientY);
|
||||
};
|
||||
|
||||
return (
|
||||
<div
|
||||
className="fixed top-0 left-0 right-0 backdrop-blur-md bg-opacity-60 z-50"
|
||||
onMouseMove={handleMouseMove}
|
||||
>
|
||||
<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%)`,
|
||||
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>
|
||||
<nav className="nav">
|
||||
<ul className="flex space-x-6">
|
||||
<li>
|
||||
<Link href="/" legacyBehavior>
|
||||
<a className="text-white hover:text-blue-500 transition-colors duration-300">
|
||||
Home
|
||||
</a>
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link href="/events" legacyBehavior>
|
||||
<a className="text-white hover:text-blue-500 transition-colors duration-300">
|
||||
Events
|
||||
</a>
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link href="/contact" legacyBehavior>
|
||||
<a className="text-white hover:text-blue-500 transition-colors duration-300">
|
||||
Contact
|
||||
</a>
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<button className="bg-gradient-to-r from-blue-500 to-indigo-700 text-white px-4 py-1 rounded-full transform transition-transform duration-300 hover:scale-105 shadow-lg hover:shadow-2xl">
|
||||
Login
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Header;
|
||||
30
components/scripts/MetaMask.tsx
Normal file
30
components/scripts/MetaMask.tsx
Normal file
@@ -0,0 +1,30 @@
|
||||
'use client';
|
||||
|
||||
import React, { useEffect } from 'react';
|
||||
|
||||
const MetaMask = () => {
|
||||
const isMetaMaskInstalled = () =>
|
||||
typeof (window as { ethereum?: unknown }).ethereum !== 'undefined';
|
||||
|
||||
useEffect(() => {
|
||||
console.log('Print something');
|
||||
}, []);
|
||||
|
||||
// TODO FIX! This is not working :(
|
||||
const metaMaskInstalled = isMetaMaskInstalled();
|
||||
//console.log(metaMaskInstalled);
|
||||
|
||||
return (
|
||||
<div className="text-center p-4">
|
||||
{metaMaskInstalled ? (
|
||||
<button className="bg-blue-500 text-white px-4 py-2 rounded">
|
||||
Connect Wallet
|
||||
</button>
|
||||
) : (
|
||||
<p>MetaMask not detected</p>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default MetaMask;
|
||||
16
components/scripts/Test.tsx
Normal file
16
components/scripts/Test.tsx
Normal file
@@ -0,0 +1,16 @@
|
||||
'use client';
|
||||
import React, { useEffect } from 'react';
|
||||
|
||||
const Test = () => {
|
||||
useEffect(() => {
|
||||
console.log('Print some shit');
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div>
|
||||
<p>Hellao!</p>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Test;
|
||||
8410
package-lock.json
generated
8410
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -10,6 +10,7 @@
|
||||
"prepare": "husky"
|
||||
},
|
||||
"dependencies": {
|
||||
"@metamask/sdk-react": "^0.30.0",
|
||||
"@radix-ui/react-icons": "^1.3.0",
|
||||
"@radix-ui/react-label": "^2.1.0",
|
||||
"@radix-ui/react-select": "^2.1.2",
|
||||
|
||||
Reference in New Issue
Block a user