From cc65a7e82a44314732c14075d848363f78dc9eeb Mon Sep 17 00:00:00 2001 From: ashprit Date: Sun, 27 Oct 2024 04:22:42 +0000 Subject: [PATCH] profile page extensions --- app/contact/page.tsx | 19 ---------- app/page.tsx | 4 +++ app/profile/page.tsx | 63 ++++++++++++++++++++++++++++++++ components/PreviousTickets.tsx | 3 +- components/ProfilePage.tsx | 65 +--------------------------------- components/custom/Profile.tsx | 42 ++++++---------------- components/custom/header.tsx | 4 +-- env | 2 ++ 8 files changed, 85 insertions(+), 117 deletions(-) delete mode 100644 app/contact/page.tsx create mode 100644 app/profile/page.tsx create mode 100644 env diff --git a/app/contact/page.tsx b/app/contact/page.tsx deleted file mode 100644 index b998cdb..0000000 --- a/app/contact/page.tsx +++ /dev/null @@ -1,19 +0,0 @@ -'use client'; -import React from 'react'; -import Header from '../../components/custom/header'; -import Footer from '../../components/custom/footer'; - -const ContactPage: React.FC = () => { - return ( -
-
-
- {/* implement contact page here */} -

Page to be implemented

-
-
-
- ); -}; - -export default ContactPage; diff --git a/app/page.tsx b/app/page.tsx index 2e06782..6564df6 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -10,6 +10,10 @@ import { Button } from '@/components/ui/button'; import React from 'react'; import { FlipWords } from '@/components/ui/flip-words'; +// profile +// profile props +// profile hanle + export default function Home() { const router = useRouter(); const [isClient, setIsClient] = useState(false); diff --git a/app/profile/page.tsx b/app/profile/page.tsx new file mode 100644 index 0000000..7289dce --- /dev/null +++ b/app/profile/page.tsx @@ -0,0 +1,63 @@ +'use client'; +import React, { useEffect, useState } from 'react'; +import Header from '../../components/custom/header'; +import Footer from '../../components/custom/footer'; +import Profile from '@/components/custom/Profile'; +import PreviousTickets from '@/components/PreviousTickets'; + +const ProfilePage: React.FC = () => { + const [isClient, setIsClient] = useState(false); + const [isAuth, setAuth] = useState(false); + + useEffect(() => { + // This ensures the component renders only on the client side + setIsClient(true); + }, []); + + useEffect(() => {}); + + return ( + <> +
+
+
+
+ {/* Video Background */} + {isClient && ( + + )} + + {/* Dark Overlay for Enhanced Readability */} +
+ +
+ + + {/* Render PreviousTickets component with appropriate props */} + +
+
+
+
+
+ + ); +}; + +export default ProfilePage; diff --git a/components/PreviousTickets.tsx b/components/PreviousTickets.tsx index 8f17eb8..e799007 100644 --- a/components/PreviousTickets.tsx +++ b/components/PreviousTickets.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { PreviousTicketComponent } from '@/components/custom/previousTicket'; +import { PreviousTicket } from '@/components/custom/previousTicket'; -const PreviousTickets = () => { +const PreviousTickets = ({}: PreviousTicket) => { return (
{
{/* Page Content Over the Video */} -
-
-
-
- Book your next - - on the Flare blockchain. -
-
- -
- - -
-
-
- - - -
-
-
-
-
+
); diff --git a/components/custom/Profile.tsx b/components/custom/Profile.tsx index a554df0..9c410cd 100644 --- a/components/custom/Profile.tsx +++ b/components/custom/Profile.tsx @@ -11,6 +11,11 @@ import { import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; import { motion } from 'framer-motion'; +import { PreviousTicketComponent } from './previousTicket'; + +interface profileProps { + profileKey: string; +} // Dark theme and animation setup const cardVariants = { @@ -18,7 +23,7 @@ const cardVariants = { visible: { opacity: 1, y: 0 }, }; -const Profile = () => { +const Profile = ({ profileKey }: profileProps) => { return ( { initial={{ opacity: 0, y: -10 }} animate={{ opacity: 1, y: 0 }} transition={{ delay: 0.1, duration: 0.5 }} - > - Profile - + >
- - - - -
@@ -77,11 +61,7 @@ const Profile = () => { initial={{ opacity: 0, y: 10 }} animate={{ opacity: 1, y: 0 }} transition={{ delay: 0.4, duration: 0.4 }} - > - - + > diff --git a/components/custom/header.tsx b/components/custom/header.tsx index c25cdfd..9d40803 100644 --- a/components/custom/header.tsx +++ b/components/custom/header.tsx @@ -73,12 +73,12 @@ const Header = () => {
  • - + - Contact + Profile
  • diff --git a/env b/env new file mode 100644 index 0000000..6beaef3 --- /dev/null +++ b/env @@ -0,0 +1,2 @@ +NEXT_PUBLIC_RPC_URL=https://coston2.enosys.global/ext/C/rpc +NEXT_PUBLIC_CONTRACT_ADDRESS=0xe84032D41216B21153f4Ab0d98EA396f777fc957