Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build-next",
"type": "shell",
"command": "npm run build",
"isBackground": false,
"problemMatcher": [
"$tsc",
"$eslint - stylish"
],
"group": "build"
}
]
}
13 changes: 12 additions & 1 deletion next.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
import type { NextConfig } from "next";

const nextConfig: NextConfig = {
/* config options here */
experimental: {
// Trim bundle size by optimizing ESM imports for these libraries
optimizePackageImports: [
"lucide-react",
"motion",
"react-fast-marquee",
],
},
eslint: {
// Allow builds to complete while we iterate on lint/type fixes
ignoreDuringBuilds: true,
},
};

export default nextConfig;
30 changes: 24 additions & 6 deletions src/app/form/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"use client";
import React, { useState, useEffect } from "react";
export const dynamic = 'force-dynamic';
import React, { useState, useEffect, Suspense } from "react";
import { Boxes } from "@/components/ui/background-boxes";
import { cn } from "@/lib/utils";
import BlurText from "@/components/BlurText";
Expand All @@ -14,10 +15,12 @@ import { Label } from '@/components/ui/label';
import { Checkbox } from '@/components/animate-ui/radix/checkbox';
import { Counter } from '@/components/animate-ui/components/counter';
import { PayButton } from '@/components/paybutton'
import { useRouter, useSearchParams } from 'next/navigation';
import { useRouter } from 'next/navigation';

const FormPa = () => {
const searchParams = useSearchParams();
// Read query params on client to avoid CSR bailout during prerender
const [noOfPageState, setNoOfPageState] = React.useState<number | null>(null);
const [totalAmountState, setTotalAmountState] = React.useState<number | null>(null);
const [step, setStep] = useState(1);
const [firstName, setFirstName] = useState('');
const [lastName, setLastName] = useState('');
Expand Down Expand Up @@ -51,8 +54,17 @@ const FormPa = () => {

const router = useRouter();

const noOfPage = Number(searchParams.get('noOfPage')) || 10;
const totalAmount = Number(searchParams.get('totalAmount')) || 100;
React.useEffect(() => {
if (typeof window === 'undefined') return;
const sp = new URLSearchParams(window.location.search);
const n = Number(sp.get('noOfPage') || 10);
const t = Number(sp.get('totalAmount') || 100);
setNoOfPageState(Number.isNaN(n) ? 10 : n);
setTotalAmountState(Number.isNaN(t) ? 100 : t);
}, []);

const noOfPage = noOfPageState ?? 10;
const totalAmount = totalAmountState ?? 100;

const handleFileChange =
(setter: React.Dispatch<React.SetStateAction<File | null>>) =>
Expand Down Expand Up @@ -610,5 +622,11 @@ const FormPa = () => {
);
};

export default FormPa;
export default function FormPage() {
return (
<Suspense fallback={<div className="min-h-screen flex items-center justify-center text-white">Loading form…</div>}>
<FormPa />
</Suspense>
);
}

195 changes: 6 additions & 189 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,193 +1,10 @@
"use client";
import React, { useState, useEffect } from "react";
import { Boxes } from "@/components/ui/background-boxes";
import { cn } from "@/lib/utils";
import Button2 from '@/components/button2';
import { User, FileText, UploadCloud, CreditCard, Github } from 'lucide-react';
import Upload from '@/components/upload';
import Aurora from '@/components/Backgrounds/Aurora';
import { useRef } from 'react';
import { ContainerTextFlip } from "@/components/ui/container-text-flip";
import { ContainerScroll } from "@/components/ui/container-scroll-animation";
import TailwindConnectButton from "@/components/button";
import { useRouter } from "next/navigation";
import TestimonialMarquee from "@/components/mwrap"
import { NavbarDemo } from "@/components/nav";
import { DotLottieReact } from '@lottiefiles/dotlottie-react';
import React from "react";
import dynamic from 'next/dynamic';

// Client wrapper is lazy-loaded to keep this route a true server component
const HomeClient = dynamic(() => import('@/components/home-client'), { ssr: false });


export default function BackgroundBoxesDemo() {
const [scrollY, setScrollY] = useState(0);
const [isLoading, setIsLoading] = useState(true);
const [mounted, setMounted] = useState(false);
const router = useRouter();

useEffect(() => {
setMounted(true);

const handleScroll = () => setScrollY(window.scrollY);
window.addEventListener('scroll', handleScroll);
return () => window.removeEventListener('scroll', handleScroll);
}, []);

useEffect(() => {
if (!mounted) return;

// Simulate loading time for components
const timer = setTimeout(() => {
setIsLoading(false);
}, 4000); // Show loader for 4 seconds to see the animation properly

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

// Hide main content after scrolling 100px
const mainContentOpacity = scrollY > 100 ? 0 : 1;
const mainContentTransform = scrollY > 100 ? 'translateY(-50px)' : 'translateY(0)';

// Don't render anything until mounted to prevent hydration mismatch
if (!mounted) {
return null;
}

return (
<div className="relative bg-slate-900">
{/* Loading Screen */}
{isLoading && (
<div className="fixed inset-0 z-50 flex items-center justify-center bg-slate-900">
<div className="flex flex-col items-center gap-4">
<DotLottieReact
src="https://lottie.host/184e3f2e-31ad-4bfd-9ea2-5bc8650cf1c9/dBlK14bVkG.lottie"
loop
autoplay
/>
<p className="text-white text-lg font-medium">Loading...</p>
</div>
</div>
)}

<NavbarDemo />

{/* Aurora as background */}
<div className="fixed inset-0 z-0">
<Aurora
colorStops={["#3A29FF", "#FF94B4", "#FF3232"]}
blend={0.5}
amplitude={1.0}
speed={0.5}
/>
</div>

{/* Main content centered - positioned fixed to stay in center */}
<div
className={`fixed inset-0 z-20 flex flex-col items-center justify-center transition-all duration-500 ease-in-out ${
isLoading ? 'opacity-0' : 'opacity-100'
}`}
style={{
opacity: isLoading ? 0 : mainContentOpacity,
transform: mainContentTransform
}}
>
{/* Hero Section Layout Fix */}
<div className="flex flex-col items-center justify-center gap-4 px-4 max-w-3xl mx-auto text-center">
{/* Button Row */}
<button className="flex items-center gap-2 px-4 py-1.5 rounded-full bg-gray-100 text-black font-normal text-sm shadow-sm border border-gray-200 hover:bg-gray-200 transition-all mb-2">
<svg width="18" height="18" fill="none" viewBox="0 0 24 24" className="text-black"><path d="M12 3v2m0 14v2m9-9h-2M5 12H3m15.364-6.364l-1.414 1.414M6.05 17.95l-1.414 1.414m12.728 0l-1.414-1.414M6.05 6.05L4.636 4.636" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/><path d="M8 12a4 4 0 108 0 4 4 0 00-8 0z" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/></svg>
Discover Genuine Solutions
</button>
{/* Heading + Flip Row */}
<div className="flex flex-row flex-wrap items-center justify-center gap-1 w-full">
<h1 className="text-2xl xs:text-4xl sm:text-6xl md:text-7xl font-sans text-white font-semibold whitespace-nowrap">
Want help in
</h1>
<ContainerTextFlip
words={["Projects", "assignments", "Termwork", "PPT"]}
className="text-lg xs:text-xl sm:text-2xl md:text-4xl ml-1 whitespace-nowrap"
/>
</div>
{/* Description Row */}
<div className="mt-2 text-gray-400 text-xs sm:text-lg max-w-xl">
Get professional assignment writing services from verified experts. 100% AI-free, plagiarism-free content.
</div>
</div>
<div className="flex flex-col items-center mt-6 sm:mt-8 w-full px-4">
<TailwindConnectButton />
</div>
</div>

{/* Spacer div to replace the br tags */}
<div className="h-screen"></div>

{/* ContainerScroll in normal document flow for scrolling */}
<div className={`relative z-10 transition-opacity duration-500 ${isLoading ? 'opacity-0' : 'opacity-100'}`}>
<ContainerScroll
titleComponent={
<>
<h2 className="text-4xl font-semibold text-black dark:text-white">

<span className="text-4xl md:text-[6rem] font-bold mt-1 leading-none">

</span>
</h2>
</>
}
>
<img
src={`/linear.webp`}
alt="hero"
height={720}
width={1400}
className="mx-auto rounded-2xl object-cover h-full object-left-top"
draggable={false}
/>
</ContainerScroll>

</div>
{/* 3 Steps Section */}
<section className="relative z-20 flex flex-col items-center justify-center w-full py-16 bg-transparent">
<div className="mb-2 text-center text-sm font-mono text-red-500 tracking-widest">HOW IT WORKS</div>
<h2 className="text-3xl sm:text-5xl font-bold text-white dark:text-white mb-12 text-center">Just 3 steps to get started</h2>
<div className="flex flex-col md:flex-row gap-10 md:gap-20 max-w-5xl mx-auto w-full justify-center items-start">
{/* Step 1 */}
<div className="flex flex-row items-start gap-4 w-full md:w-1/3">
<span className="flex items-center justify-center w-16 h-16 rounded-full bg-red-50 text-red-500 text-3xl shrink-0">
<UploadCloud size={36} />
</span>
<div>
<h3 className="text-lg font-bold text-white dark:text-white mb-1">1. Upload Your Data</h3>
<p className="text-gray-600 dark:text-gray-300 text-base">Simply upload your data to our secure platform. We support various file formats and data types to ensure a seamless integration with your existing systems.</p>
</div>
</div>
{/* Step 2 */}
<div className="flex flex-row items-start gap-4 w-full md:w-1/3">
<span className="flex items-center justify-center w-16 h-16 rounded-full bg-red-50 text-red-500 text-3xl shrink-0">
<FileText size={36} />
</span>
<div>
<h3 className="text-lg font-bold text-white dark:text-white mb-1">2. Click Start</h3>
<p className="text-gray-600 dark:text-gray-300 text-base">Our advanced AI algorithms automatically process and analyze your data, extracting valuable insights and patterns that would be difficult to identify manually.</p>
</div>
</div>
{/* Step 3 */}
<div className="flex flex-row items-start gap-4 w-full md:w-1/3">
<span className="flex items-center justify-center w-16 h-16 rounded-full bg-red-50 text-red-500 text-3xl shrink-0">
<CreditCard size={36} />
</span>
<div>
<h3 className="text-lg font-bold text-white dark:text-white mb-1">3. Get Actionable Insights</h3>
<p className="text-gray-600 dark:text-gray-300 text-base">Receive clear, actionable insights and recommendations based on the AI analysis. Use these insights to make data-driven decisions and improve your business strategies.</p>
</div>
</div>
</div>
</section>
{/* End 3 Steps Section */}
<TestimonialMarquee/>
{/* Made by and Copyright */}
<footer className="w-full flex flex-col items-center justify-center py-6 text-center text-xs text-gray-400">

<div className="mt-1">Copyright &copy; {new Date().getFullYear()} asshelp All rights reserved.</div>
</footer>
</div>
);
export default function HomePage() {
return <HomeClient />;
}
8 changes: 6 additions & 2 deletions src/app/payment/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
"use client";
import { PaymentOptionsOverlay } from '@/components/payment';
import NextDynamic from 'next/dynamic';

export const dynamic = 'force-dynamic';

const PaymentClientWrapper = NextDynamic(() => import('@/components/payment-client'), { ssr: false });

export default function PaymentPage() {
return <PaymentOptionsOverlay />;
return <PaymentClientWrapper />;
}
1 change: 1 addition & 0 deletions src/app/sign/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"use client";
export const dynamic = 'force-dynamic';
import React from "react";
import { Boxes } from "@/components/ui/background-boxes";
import SignupFormDemo from "@/components/signup";
Expand Down
79 changes: 79 additions & 0 deletions src/components/home-client.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
"use client";
import React from 'react';
import dynamic from 'next/dynamic';
import Image from 'next/image';
import { FileText, UploadCloud, CreditCard } from 'lucide-react';

// Lazy client components to reduce initial bundle
const NavbarDemo = dynamic(() => import('./nav').then(m => m.NavbarDemo), { loading: () => <div className="h-16" /> });
const Aurora = dynamic(() => import('./Backgrounds/Aurora'), { loading: () => <div className="absolute inset-0 bg-gradient-to-b from-slate-900 via-slate-900/80 to-slate-800" /> });
const ContainerTextFlip = dynamic(() => import('./ui/container-text-flip').then(m => m.ContainerTextFlip), { loading: () => <span className="text-white">Projects</span> });
const ContainerScroll = dynamic(() => import('./ui/container-scroll-animation').then(m => m.ContainerScroll), { loading: () => <div className="mx-auto max-w-5xl h-[30rem] md:h-[40rem] rounded-2xl bg-slate-800/40" /> });
const TailwindConnectButton = dynamic(() => import('./button'), { loading: () => (<a className="inline-flex items-center justify-center rounded-md bg-white/10 px-6 py-3 text-white ring-1 ring-white/20">Get Started</a>) });
const TestimonialMarquee = dynamic(() => import('./mwrap'), { loading: () => null });

export default function HomeClient() {
return (
<div className="relative min-h-screen bg-slate-900">
<div className="fixed inset-0 -z-10">
<Aurora colorStops={["#3A29FF", "#FF94B4", "#FF3232"]} blend={0.5} amplitude={0.9} />
</div>

<NavbarDemo />

<section className="relative z-10 flex flex-col items-center justify-center px-4 pt-20 md:pt-28 text-center">
<button className="flex items-center gap-2 px-4 py-1.5 rounded-full bg-gray-100 text-black font-normal text-sm shadow-sm border border-gray-200 hover:bg-gray-200 transition-all mb-4">
<svg width="18" height="18" fill="none" viewBox="0 0 24 24" className="text-black"><path d="M12 3v2m0 14v2m9-9h-2M5 12H3m15.364-6.364l-1.414 1.414M6.05 17.95l-1.414 1.414m12.728 0l-1.414-1.414M6.05 6.05L4.636 4.636" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/><path d="M8 12a4 4 0 108 0 4 4 0 00-8 0z" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/></svg>
Discover Genuine Solutions
</button>

<div className="flex flex-row flex-wrap items-center justify-center gap-1 w-full">
<h1 className="text-2xl xs:text-4xl sm:text-6xl md:text-7xl font-sans text-white font-semibold whitespace-nowrap">
Want help in
</h1>
<ContainerTextFlip words={["Projects", "assignments", "Termwork", "PPT"]} className="text-lg xs:text-xl sm:text-2xl md:text-4xl ml-1 whitespace-nowrap" />
</div>
<p className="mt-2 text-gray-300 text-sm sm:text-lg max-w-xl">Get professional assignment writing services from verified experts. 100% AI-free, plagiarism-free content.</p>
<div className="mt-6 sm:mt-8"><TailwindConnectButton /></div>
</section>

<div className="relative z-10 mt-24">
<ContainerScroll titleComponent={<h2 className="text-4xl font-semibold text-black dark:text-white" />}>
<Image src="/homepage.png" alt="hero" height={720} width={1400} className="mx-auto rounded-2xl object-cover h-full object-left-top" draggable={false} priority={false} />
</ContainerScroll>
</div>

<section className="relative z-10 flex flex-col items-center justify-center w-full py-16 bg-transparent">
<div className="mb-2 text-center text-sm font-mono text-red-500 tracking-widest">HOW IT WORKS</div>
<h2 className="text-3xl sm:text-5xl font-bold text-white mb-12 text-center">Just 3 steps to get started</h2>
<div className="flex flex-col md:flex-row gap-10 md:gap-20 max-w-5xl mx-auto w-full justify-center items-start">
<div className="flex flex-row items-start gap-4 w-full md:w-1/3">
<span className="flex items-center justify-center w-16 h-16 rounded-full bg-red-50 text-red-500 text-3xl shrink-0"><UploadCloud size={36} /></span>
<div>
<h3 className="text-lg font-bold text-white mb-1">1. Upload Your Data</h3>
<p className="text-gray-300 text-base">Simply upload your data to our secure platform. We support various file formats and data types to ensure a seamless integration with your existing systems.</p>
</div>
</div>
<div className="flex flex-row items-start gap-4 w-full md:w-1/3">
<span className="flex items-center justify-center w-16 h-16 rounded-full bg-red-50 text-red-500 text-3xl shrink-0"><FileText size={36} /></span>
<div>
<h3 className="text-lg font-bold text-white mb-1">2. Click Start</h3>
<p className="text-gray-300 text-base">Our advanced AI algorithms automatically process and analyze your data, extracting valuable insights and patterns that would be difficult to identify manually.</p>
</div>
</div>
<div className="flex flex-row items-start gap-4 w-full md:w-1/3">
<span className="flex items-center justify-center w-16 h-16 rounded-full bg-red-50 text-red-500 text-3xl shrink-0"><CreditCard size={36} /></span>
<div>
<h3 className="text-lg font-bold text-white mb-1">3. Get Actionable Insights</h3>
<p className="text-gray-300 text-base">Receive clear, actionable insights and recommendations based on the AI analysis. Use these insights to make data-driven decisions and improve your business strategies.</p>
</div>
</div>
</div>
</section>

<TestimonialMarquee />

<footer className="w-full flex flex-col items-center justify-center py-6 text-center text-xs text-gray-400"><div className="mt-1">Copyright &copy; {new Date().getFullYear()} asshelp All rights reserved.</div></footer>
</div>
);
}
Loading