From dcb9177168c46dff2ba9056270214b77fb277b46 Mon Sep 17 00:00:00 2001 From: laveshparyani Date: Fri, 27 Mar 2026 09:18:41 +0530 Subject: [PATCH 1/3] feat(ui): implement full responsiveness for CurvedCarousel --- apps/web/components/ui/curved-carousel.tsx | 33 ++++++++++++++++++---- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/apps/web/components/ui/curved-carousel.tsx b/apps/web/components/ui/curved-carousel.tsx index 110383b..95c5893 100644 --- a/apps/web/components/ui/curved-carousel.tsx +++ b/apps/web/components/ui/curved-carousel.tsx @@ -51,7 +51,7 @@ function CarouselCard({ ); const itemZ = useTransform(combinedPos, [-itemOffset + centerOffset - itemTotalWidth, -itemOffset + centerOffset, -itemOffset + centerOffset + itemTotalWidth], - [-200, 0, -200] + [-itemWidth * 0.5, 0, -itemWidth * 0.5] ); const itemOpacity = useTransform(combinedPos, [-itemOffset + centerOffset - 2 * itemTotalWidth, -itemOffset + centerOffset, -itemOffset + centerOffset + 2 * itemTotalWidth], @@ -107,15 +107,37 @@ export function CurvedCarousel({ items, title, subtitle }: CurvedCarouselProps) const [active, setActive] = useState(0); const x = useMotionValue(0); const [isDragging, setIsDragging] = useState(false); + const [dimensions, setDimensions] = useState({ width: 480, height: 270, gap: 32 }); + + // Responsive dimensions + useEffect(() => { + const handleResize = () => { + const width = window.innerWidth; + if (width < 640) { + // Mobile + const w = Math.min(width - 40, 320); + setDimensions({ width: w, height: w * 9/16, gap: 16 }); + } else if (width < 1024) { + // Tablet + setDimensions({ width: 400, height: 225, gap: 24 }); + } else { + // Desktop + setDimensions({ width: 480, height: 270, gap: 32 }); + } + }; + + handleResize(); + window.addEventListener('resize', handleResize); + return () => window.removeEventListener('resize', handleResize); + }, []); + + const { width: itemWidth, height: itemHeight, gap } = dimensions; // Triplicate items for infinite loop const displayItems = useMemo(() => [...items, ...items, ...items], [items]); const middleIndexOffset = items.length; // Constants - const itemWidth = 480; - const itemHeight = 270; - const gap = 32; const itemTotalWidth = itemWidth + gap; const centerOffset = -itemWidth / 2; @@ -177,7 +199,8 @@ export function CurvedCarousel({ items, title, subtitle }: CurvedCarouselProps)
Date: Fri, 27 Mar 2026 09:33:34 +0530 Subject: [PATCH 2/3] fix(ui): implement scroll-aware snapping for perfect carousel centering --- apps/web/components/ui/curved-carousel.tsx | 23 +++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/apps/web/components/ui/curved-carousel.tsx b/apps/web/components/ui/curved-carousel.tsx index 95c5893..2bb9423 100644 --- a/apps/web/components/ui/curved-carousel.tsx +++ b/apps/web/components/ui/curved-carousel.tsx @@ -150,8 +150,9 @@ export function CurvedCarousel({ items, title, subtitle }: CurvedCarouselProps) offset: ["start end", "end start"] }); - // Map scroll progress to a rotational offset - reduced for subtler effect - const scrollOffset = useTransform(scrollYProgress, [0, 1], [itemTotalWidth * 0.4, -itemTotalWidth * 0.4]); + // Map scroll progress to a rotational offset - reduced for subtler effect and responsive scaling + const scrollIntensity = itemWidth < 400 ? 0.15 : 0.3; + const scrollOffset = useTransform(scrollYProgress, [0, 1], [itemWidth * scrollIntensity, -itemWidth * scrollIntensity]); // Combined position for all items to reactive to const combinedPos = useTransform([springX, scrollOffset], ([sx, so]) => (sx as number) + (so as number)); @@ -162,8 +163,9 @@ export function CurvedCarousel({ items, title, subtitle }: CurvedCarouselProps) setTimeout(() => setIsDragging(false), 50); const velocity = info.velocity.x; - const currentX = x.get() - centerOffset; - let newIndex = Math.round(-currentX / itemTotalWidth); + // Calculate current visual position relative to the center + const visualX = x.get() + scrollOffset.get() - centerOffset; + let newIndex = Math.round(-visualX / itemTotalWidth); if (Math.abs(velocity) > 500) { newIndex = velocity > 0 ? active - 1 : active + 1; @@ -177,13 +179,16 @@ export function CurvedCarousel({ items, title, subtitle }: CurvedCarouselProps) }; useEffect(() => { - x.set(-(middleIndexOffset * itemTotalWidth) + centerOffset); + // Subtract current scrollOffset so that combinedPos (x + scrollOffset) equals the target + const targetX = -(middleIndexOffset * itemTotalWidth) + centerOffset; + x.set(targetX - scrollOffset.get()); setActive(middleIndexOffset); - }, [middleIndexOffset, itemTotalWidth, centerOffset, x]); + }, [middleIndexOffset, itemTotalWidth, centerOffset, x, scrollOffset]); useEffect(() => { - x.set(-(active * itemTotalWidth) + centerOffset); - }, [active, x, itemTotalWidth, centerOffset]); + const targetX = -(active * itemTotalWidth) + centerOffset; + x.set(targetX - scrollOffset.get()); + }, [active, x, itemTotalWidth, centerOffset, scrollOffset]); const handleCardClick = (videoId: string) => { if (isDragging) return; @@ -213,7 +218,7 @@ export function CurvedCarousel({ items, title, subtitle }: CurvedCarouselProps) x.set(x.get() + info.delta.x); }} style={{ x: combinedPos, left: "50%" }} - className="absolute flex gap-8 items-center cursor-grab active:cursor-grabbing" + className="absolute flex gap-8 items-center cursor-grab active:cursor-grabbing preserve-3d" > {displayItems.map((item, index) => ( Date: Fri, 27 Mar 2026 16:06:23 +0530 Subject: [PATCH 3/3] feat: implement global auth redirects to RestroFX portal and fix client component boundaries --- apps/web/app/contact/page.tsx | 2 +- apps/web/app/login/page.tsx | 115 +++----------- apps/web/app/page.tsx | 2 +- apps/web/app/partners/affiliate/page.tsx | 6 +- apps/web/app/partners/ib/page.tsx | 4 +- apps/web/app/partners/page.tsx | 4 +- .../app/platforms/ai-trading-journal/page.tsx | 6 +- apps/web/app/platforms/lock-it-trade/page.tsx | 4 +- apps/web/app/platforms/tradelocker/page.tsx | 2 +- apps/web/app/register/page.tsx | 140 +++--------------- apps/web/components/footer.tsx | 2 +- .../sections/about-section-enhanced.tsx | 2 +- .../sections/ai-trading-journal-section.tsx | 2 +- .../components/sections/demo/demo-content.tsx | 2 +- apps/web/components/sections/hero-section.tsx | 2 +- .../sections/markets/markets-grid.tsx | 2 +- .../sections/platforms/platforms-list.tsx | 2 +- .../sections/trading-platforms-section.tsx | 2 +- apps/web/components/ui/header-3.tsx | 42 +++--- 19 files changed, 84 insertions(+), 259 deletions(-) diff --git a/apps/web/app/contact/page.tsx b/apps/web/app/contact/page.tsx index 01b4e10..7e91c62 100644 --- a/apps/web/app/contact/page.tsx +++ b/apps/web/app/contact/page.tsx @@ -283,7 +283,7 @@ export default function ContactPage() { Ready to start trading with RestroFX?

-
- - - - - -
+
+
+ +

Redirecting to Portal

+

Please wait while we take you to the RestroFX login page...

+ + + +
Don't have an account?{" "} - + Create free account
diff --git a/apps/web/app/page.tsx b/apps/web/app/page.tsx index a9a6bc2..a858a4a 100644 --- a/apps/web/app/page.tsx +++ b/apps/web/app/page.tsx @@ -25,7 +25,7 @@ export default function Home() { title="Restro FX: Redefining Your Trading Experience." subtitle="Merge deep market expertise with advanced trading platforms. Algorithm-driven strategies and risk management to help you surpass your investment goals." ctaLabel="Start Trading" - ctaHref="/register" + ctaHref="https://portal.restrofx.com/register" secondaryCtaLabel="View Platforms" secondaryCtaHref="/platforms" /> diff --git a/apps/web/app/partners/affiliate/page.tsx b/apps/web/app/partners/affiliate/page.tsx index 6cb8dbe..4968058 100644 --- a/apps/web/app/partners/affiliate/page.tsx +++ b/apps/web/app/partners/affiliate/page.tsx @@ -219,7 +219,7 @@ export default function AffiliateProgramPage() {
@@ -329,7 +329,7 @@ export default function AffiliateProgramPage() { variant={model.popular ? "default" : "outline"} asChild > - Get Started + Get Started
))} @@ -473,7 +473,7 @@ export default function AffiliateProgramPage() { className="w-full sm:w-auto rounded-full px-12 h-16 text-lg font-bold bg-white text-primary hover:bg-neutral-100 shadow-[0_20px_50px_rgba(0,0,0,0.3)] hover:-translate-y-2 hover:shadow-[0_30px_60px_rgba(220,0,0,0.4)] transition-all duration-500 group relative overflow-hidden active:scale-95" asChild > - + Become an Affiliate diff --git a/apps/web/app/partners/ib/page.tsx b/apps/web/app/partners/ib/page.tsx index afe68b3..4d99e6c 100644 --- a/apps/web/app/partners/ib/page.tsx +++ b/apps/web/app/partners/ib/page.tsx @@ -98,7 +98,7 @@ export default function IBProgramPage() {
@@ -241,7 +241,7 @@ export default function IBProgramPage() {

diff --git a/apps/web/app/partners/page.tsx b/apps/web/app/partners/page.tsx index fefe915..15dca0e 100644 --- a/apps/web/app/partners/page.tsx +++ b/apps/web/app/partners/page.tsx @@ -133,7 +133,7 @@ export default function AffiliateProgramPage() {
@@ -244,7 +244,7 @@ export default function AffiliateProgramPage() { Join our affiliate program today and start earning commissions

diff --git a/apps/web/app/platforms/ai-trading-journal/page.tsx b/apps/web/app/platforms/ai-trading-journal/page.tsx index 083706a..2813fd4 100644 --- a/apps/web/app/platforms/ai-trading-journal/page.tsx +++ b/apps/web/app/platforms/ai-trading-journal/page.tsx @@ -119,7 +119,7 @@ export default function AITradingJournalPage() {
@@ -212,7 +212,7 @@ export default function AITradingJournalPage() {
- +
{/* Glassmorphic overlay */}
@@ -311,7 +311,7 @@ export default function AITradingJournalPage() { className="w-full sm:w-auto rounded-full px-12 h-16 text-lg font-bold bg-white text-primary hover:bg-neutral-100 shadow-[0_20px_50px_rgba(0,0,0,0.3)] hover:-translate-y-2 hover:shadow-[0_30px_60px_rgba(220,0,0,0.4)] transition-all duration-500 group relative overflow-hidden active:scale-95" asChild > - + Get Started Free diff --git a/apps/web/app/platforms/lock-it-trade/page.tsx b/apps/web/app/platforms/lock-it-trade/page.tsx index e2f3422..c2772b8 100644 --- a/apps/web/app/platforms/lock-it-trade/page.tsx +++ b/apps/web/app/platforms/lock-it-trade/page.tsx @@ -221,7 +221,7 @@ export default function LockItTradePage() { className="rounded-full px-10 h-16 text-lg font-bold shadow-2xl shadow-primary/30 hover:shadow-primary/50 hover:scale-105 transition-all duration-300 group relative overflow-hidden" asChild > - + Start Free Journaling @@ -509,7 +509,7 @@ export default function LockItTradePage() { className="w-full sm:w-auto rounded-full px-8 sm:px-12 h-14 sm:h-16 text-base sm:text-lg font-bold bg-white text-primary hover:bg-neutral-100 shadow-[0_20px_50px_rgba(0,0,0,0.3)] hover:-translate-y-2 hover:shadow-[0_30px_60px_rgba(220,0,0,0.4)] transition-all duration-500 group relative overflow-hidden active:scale-95" asChild > - + Start Free Journaling diff --git a/apps/web/app/platforms/tradelocker/page.tsx b/apps/web/app/platforms/tradelocker/page.tsx index da4453a..b2b4fba 100644 --- a/apps/web/app/platforms/tradelocker/page.tsx +++ b/apps/web/app/platforms/tradelocker/page.tsx @@ -232,7 +232,7 @@ export default function TradeLockerPage() { className="rounded-full px-10 h-16 text-lg font-bold shadow-2xl shadow-primary/30 hover:shadow-primary/50 hover:scale-105 transition-all duration-300 group relative overflow-hidden" asChild > - + Start Trading diff --git a/apps/web/app/register/page.tsx b/apps/web/app/register/page.tsx index 2968a6c..c1334c3 100644 --- a/apps/web/app/register/page.tsx +++ b/apps/web/app/register/page.tsx @@ -1,33 +1,18 @@ "use client"; -import React, { useState } from "react"; +import { useEffect } from "react"; import Link from "next/link"; import { CanvasRevealEffect } from "@/components/ui/canvas-reveal-effect"; import { Button } from "@crimsonfx/ui"; import { Navbar } from "@/components/navbar"; import { Footer } from "@/components/footer"; -import { Eye, EyeOff, Lock, Mail, User, ArrowRight } from "lucide-react"; +import { Loader2 } from "lucide-react"; export default function RegisterPage() { - const [formData, setFormData] = useState({ - name: "", - email: "", - password: "" - }); - const [showPassword, setShowPassword] = useState(false); + useEffect(() => { + window.location.replace("https://portal.restrofx.com/register"); + }, []); - const handleChange = (e: React.ChangeEvent) => { - setFormData({ - ...formData, - [e.target.id]: e.target.value - }); - }; - - const handleSubmit = (e: React.FormEvent) => { - e.preventDefault(); - // Handle register logic here - console.log("Register with:", formData); - }; return (
@@ -45,107 +30,22 @@ export default function RegisterPage() {
{/* Content Layer */} -
-
-
-

Create Account

-

Join Restro FX and start trading

-
- -
-
- -
-
- -
- -
-
- -
- -
-
- -
- -
-
- -
- -
-
- -
- - -
-
- - -
- -
+
+
+ +

Redirecting to Portal

+

Please wait while we take you to the RestroFX registration page...

+ + + +
Already have an account?{" "} - + Sign In
diff --git a/apps/web/components/footer.tsx b/apps/web/components/footer.tsx index 205bb41..f7e5a22 100644 --- a/apps/web/components/footer.tsx +++ b/apps/web/components/footer.tsx @@ -100,7 +100,7 @@ export function Footer() { Terms & Conditions - Opening an Account + Opening an Account
{/* Detailed Disclaimers */} diff --git a/apps/web/components/sections/about-section-enhanced.tsx b/apps/web/components/sections/about-section-enhanced.tsx index e588bf7..d9551ce 100644 --- a/apps/web/components/sections/about-section-enhanced.tsx +++ b/apps/web/components/sections/about-section-enhanced.tsx @@ -221,7 +221,7 @@ export function AboutSectionEnhanced() { customVariants={revealVariants} > START TRADING diff --git a/apps/web/components/sections/ai-trading-journal-section.tsx b/apps/web/components/sections/ai-trading-journal-section.tsx index f21568a..d9304c4 100644 --- a/apps/web/components/sections/ai-trading-journal-section.tsx +++ b/apps/web/components/sections/ai-trading-journal-section.tsx @@ -19,7 +19,7 @@ export function AiTradingJournalSection() { {/* Visual Side */}
- +
{/* Glassmorphic overlay */}
diff --git a/apps/web/components/sections/demo/demo-content.tsx b/apps/web/components/sections/demo/demo-content.tsx index 1d6c02c..9256a2d 100644 --- a/apps/web/components/sections/demo/demo-content.tsx +++ b/apps/web/components/sections/demo/demo-content.tsx @@ -105,7 +105,7 @@ export function DemoContent() {
diff --git a/apps/web/components/sections/hero-section.tsx b/apps/web/components/sections/hero-section.tsx index d41ee1b..2f8c063 100644 --- a/apps/web/components/sections/hero-section.tsx +++ b/apps/web/components/sections/hero-section.tsx @@ -26,7 +26,7 @@ export function HeroSection() {
diff --git a/apps/web/components/sections/platforms/platforms-list.tsx b/apps/web/components/sections/platforms/platforms-list.tsx index 6841515..2d1f457 100644 --- a/apps/web/components/sections/platforms/platforms-list.tsx +++ b/apps/web/components/sections/platforms/platforms-list.tsx @@ -60,7 +60,7 @@ export function PlatformsList() { diff --git a/apps/web/components/sections/trading-platforms-section.tsx b/apps/web/components/sections/trading-platforms-section.tsx index 24cba8f..b557386 100644 --- a/apps/web/components/sections/trading-platforms-section.tsx +++ b/apps/web/components/sections/trading-platforms-section.tsx @@ -131,7 +131,7 @@ export function TradingPlatformsSection() { className="text-center mt-8 md:mt-12" >