Compare commits
4 Commits
e4982bb1ed
...
16eb6c5094
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
16eb6c5094 | ||
|
|
f32a530af8 | ||
| 2b3f715b34 | |||
|
|
4dda1c2c71 |
@ -1,10 +1,12 @@
|
||||
"use client"
|
||||
|
||||
import { Setting2 } from 'iconsax-react';
|
||||
import { ArrowLeft2, Setting2 } from 'iconsax-react';
|
||||
import Image from 'next/image';
|
||||
import React, { useState, useEffect, useRef } from 'react';
|
||||
import Link from 'next/link';
|
||||
import HoverCards from '@/components/cards/HoverCards';
|
||||
import { Button } from '@/components/ui/button';
|
||||
|
||||
|
||||
interface Page {
|
||||
id: number;
|
||||
@ -17,6 +19,45 @@ export default function Reader() {
|
||||
const [transitioning, setTransitioning] = useState(false);
|
||||
const videoRefs = useRef<(HTMLVideoElement | null)[]>([]);
|
||||
|
||||
// Add wheel event handler
|
||||
const handleWheel = (event: WheelEvent) => {
|
||||
if (transitioning) return;
|
||||
|
||||
// Scroll down
|
||||
if (event.deltaY > 0) {
|
||||
handleNextPage();
|
||||
}
|
||||
// Scroll up
|
||||
else if (event.deltaY < 0) {
|
||||
handlePreviousPage();
|
||||
}
|
||||
};
|
||||
|
||||
// Add previous page handler
|
||||
const handlePreviousPage = () => {
|
||||
if (transitioning) return;
|
||||
|
||||
setTransitioning(true);
|
||||
|
||||
if (currentPageIndex > 0) {
|
||||
setCurrentPageIndex(prev => prev - 1);
|
||||
} else {
|
||||
setCurrentPageIndex(pages.length - 1);
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
setTransitioning(false);
|
||||
}, 1000);
|
||||
};
|
||||
|
||||
// Add useEffect for wheel event listener
|
||||
useEffect(() => {
|
||||
window.addEventListener('wheel', handleWheel);
|
||||
return () => {
|
||||
window.removeEventListener('wheel', handleWheel);
|
||||
};
|
||||
}, [currentPageIndex, transitioning]); // Add dependencies
|
||||
|
||||
// Content structured to match your design
|
||||
const pages: Page[] = [
|
||||
{
|
||||
@ -59,8 +100,8 @@ export default function Reader() {
|
||||
<p className="text-lg">Man, yes! Didn't I tell you not to question this man! I knew he was going to come through for us!" Handsome Twin #1 gloats.</p>
|
||||
<p className="text-lg">Handsome Twin #2 sighs in satisfaction. " <HoverCards triggerText="Gold" videourl="/videos/trend.mp4" description="Bloomberg, COMEX, Dubai Gold & Commodities Exchange, ICE Benchmark Administration, London Metal Exchange, Multi Commodity Exchange of India, Nasdaq, Shanghai Gold Exchange, Shanghai Futures Exchange, Tokyo Commodities Exchange, World Gold Council;" link=' https://www.gold.org/goldhub/data/gold-trading' />" he says, his tense demeanor turning to relief.</p>
|
||||
<p className="text-lg">Wade hands the device to Handsome Twin #2.</p>
|
||||
<p className="text-lg">"You will find all of the credentials you need on the drive. The shipment will arrive at the <HoverCards triggerText="Port of Dreytown" videourl="/videos/man.mp4"
|
||||
description="A young, sobbing visitor sat unusually close to the pulpit in the empty church, catching Pastor Evan’s attention.
|
||||
<p className="text-lg">"You will find all of the credentials you need on the drive. The shipment will arrive at the <HoverCards triggerText="Port of Dreytown" videourl="/videos/man.mp4"
|
||||
description="A young, sobbing visitor sat unusually close to the pulpit in the empty church, catching Pastor Evan’s attention.
|
||||
Typically, even regular members avoided those front pews, out of reverence, fear, or habit.
|
||||
But this man seemed untouched by such conventions, and that stood out to the pastor..." link='' /> tomorrow night," Wade explains.</p>
|
||||
</div>
|
||||
@ -109,12 +150,17 @@ export default function Reader() {
|
||||
{/* NavBar */}
|
||||
<div className='w-full h-[80px] fixed top-0 z-30 flex items-center justify-between px-6 bg-transparent'>
|
||||
{/* Logo */}
|
||||
<Link href="/">
|
||||
<div className="flex items-center text-white">
|
||||
<Image src="/images/logo2.png" alt="Wodey" width={60} height={60} className='mr-2' />
|
||||
<span className="text-xl font-semibold">Wodey</span>
|
||||
</div>
|
||||
</Link>
|
||||
|
||||
|
||||
<div className="flex items-center text-white">
|
||||
<Link href='/creator' className='mr-4 '>
|
||||
<Button size="icon" className="bg-white">
|
||||
<ArrowLeft2 size="24" color="#555555" />
|
||||
</Button>
|
||||
</Link>
|
||||
<Image src="/images/logo2.png" alt="Wodey" width={60} height={60} className='mr-2' />
|
||||
<span className="text-xl font-semibold">Wodey</span>
|
||||
</div>
|
||||
|
||||
{/* Brutal Logo - Center */}
|
||||
<div className="absolute left-1/2 transform -translate-x-1/2">
|
||||
|
||||
@ -1,9 +1,8 @@
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { Search, Heart } from 'lucide-react';
|
||||
import { Heart } from 'lucide-react';
|
||||
import Image from 'next/image';
|
||||
import { Checkbox } from '@/components/ui/checkbox';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import SearchBar from './SearchBar';
|
||||
|
||||
const mockItems = [
|
||||
{
|
||||
@ -11,15 +11,15 @@ importers:
|
||||
'@radix-ui/react-avatar':
|
||||
specifier: ^1.1.7
|
||||
version: 1.1.7(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||
'@radix-ui/react-checkbox':
|
||||
specifier: ^1.2.3
|
||||
version: 1.2.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||
'@radix-ui/react-context-menu':
|
||||
specifier: ^2.2.12
|
||||
version: 2.2.12(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||
'@radix-ui/react-hover-card':
|
||||
specifier: ^1.1.11
|
||||
version: 1.1.11(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||
'@radix-ui/react-checkbox':
|
||||
specifier: ^1.2.3
|
||||
version: 1.2.3(@types/react-dom@19.1.2(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||
'@radix-ui/react-slot':
|
||||
specifier: ^1.2.0
|
||||
version: 1.2.0(@types/react@19.1.2)(react@19.1.0)
|
||||
@ -662,6 +662,15 @@ packages:
|
||||
'@types/react':
|
||||
optional: true
|
||||
|
||||
'@radix-ui/react-use-previous@1.1.1':
|
||||
resolution: {integrity: sha512-2dHfToCj/pzca2Ck724OZ5L0EVrr3eHRNsG/b3xQJLA2hZpVCS99bLAX+hm1IHXDEnzU6by5z/5MIY794/a8NQ==}
|
||||
peerDependencies:
|
||||
'@types/react': '*'
|
||||
react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
|
||||
peerDependenciesMeta:
|
||||
'@types/react':
|
||||
optional: true
|
||||
|
||||
'@radix-ui/react-use-rect@1.1.1':
|
||||
resolution: {integrity: sha512-QTYuDesS0VtuHNNvMh+CjlKJ4LJickCMUAqjlE3+j8w+RlRpwyX3apEQKGFzbZGdo7XNG1tXa+bQqIE7HIXT2w==}
|
||||
peerDependencies:
|
||||
@ -683,24 +692,6 @@ packages:
|
||||
'@radix-ui/rect@1.1.1':
|
||||
resolution: {integrity: sha512-HPwpGIzkl28mWyZqG52jiqDJ12waP11Pa1lGoiyUkIEuMLBP0oeK/C89esbXrxsky5we7dfd8U58nm0SgAWpVw==}
|
||||
|
||||
'@radix-ui/react-use-previous@1.1.1':
|
||||
resolution: {integrity: sha512-2dHfToCj/pzca2Ck724OZ5L0EVrr3eHRNsG/b3xQJLA2hZpVCS99bLAX+hm1IHXDEnzU6by5z/5MIY794/a8NQ==}
|
||||
peerDependencies:
|
||||
'@types/react': '*'
|
||||
react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
|
||||
peerDependenciesMeta:
|
||||
'@types/react':
|
||||
optional: true
|
||||
|
||||
'@radix-ui/react-use-size@1.1.1':
|
||||
resolution: {integrity: sha512-ewrXRDTAqAXlkl6t/fkXWNAhFX9I+CkKlw6zjEwk86RSPKwZr3xpBRso655aqYafwtnbpHLj6toFzmd6xdVptQ==}
|
||||
peerDependencies:
|
||||
'@types/react': '*'
|
||||
react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
|
||||
peerDependenciesMeta:
|
||||
'@types/react':
|
||||
optional: true
|
||||
|
||||
'@rtsao/scc@1.1.0':
|
||||
resolution: {integrity: sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==}
|
||||
|
||||
@ -2721,6 +2712,12 @@ snapshots:
|
||||
optionalDependencies:
|
||||
'@types/react': 19.1.2
|
||||
|
||||
'@radix-ui/react-use-previous@1.1.1(@types/react@19.1.2)(react@19.1.0)':
|
||||
dependencies:
|
||||
react: 19.1.0
|
||||
optionalDependencies:
|
||||
'@types/react': 19.1.2
|
||||
|
||||
'@radix-ui/react-use-rect@1.1.1(@types/react@19.1.2)(react@19.1.0)':
|
||||
dependencies:
|
||||
'@radix-ui/rect': 1.1.1
|
||||
@ -2737,19 +2734,6 @@ snapshots:
|
||||
|
||||
'@radix-ui/rect@1.1.1': {}
|
||||
|
||||
'@radix-ui/react-use-previous@1.1.1(@types/react@19.1.2)(react@19.1.0)':
|
||||
dependencies:
|
||||
react: 19.1.0
|
||||
optionalDependencies:
|
||||
'@types/react': 19.1.2
|
||||
|
||||
'@radix-ui/react-use-size@1.1.1(@types/react@19.1.2)(react@19.1.0)':
|
||||
dependencies:
|
||||
'@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.1.2)(react@19.1.0)
|
||||
react: 19.1.0
|
||||
optionalDependencies:
|
||||
'@types/react': 19.1.2
|
||||
|
||||
'@rtsao/scc@1.1.0': {}
|
||||
|
||||
'@rushstack/eslint-patch@1.11.0': {}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user