File tree 2 files changed +11
-1
lines changed
2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import Image from 'next/image'
3
3
import Link from 'next/link'
4
4
5
5
import { BookCardForm } from '@/app/books/components/book-card-form'
6
+ import { ScrollUp } from '@/components/scroll-up'
6
7
import { BookResponse } from '@/core/book/dto/responses/book.response'
7
8
import { UserResponse } from '@/core/user/dto/responses/user.response'
8
9
@@ -32,6 +33,7 @@ export function BookCard(properties: BookCardProperties) {
32
33
33
34
return (
34
35
< >
36
+ < ScrollUp />
35
37
< Card
36
38
as = { Link }
37
39
className = { `group max-w-[320px] space-y-4 border-t-4 p-4 ${ cardColor } ` }
@@ -40,7 +42,6 @@ export function BookCard(properties: BookCardProperties) {
40
42
prefetch
41
43
radius = "none"
42
44
role = "gridcell"
43
- scroll = { false }
44
45
>
45
46
< div className = "relative" >
46
47
< Image
Original file line number Diff line number Diff line change
1
+ 'use client'
2
+
3
+ import { useEffect } from 'react'
4
+
5
+ export function ScrollUp ( ) {
6
+ useEffect ( ( ) => window . document . scrollingElement ?. scrollTo ( 0 , 0 ) , [ ] )
7
+
8
+ return null
9
+ }
You can’t perform that action at this time.
0 commit comments