File tree Expand file tree Collapse file tree 1 file changed +16
-11
lines changed Expand file tree Collapse file tree 1 file changed +16
-11
lines changed Original file line number Diff line number Diff line change 1
1
import { ArrowLeft } from '@phosphor-icons/react'
2
2
import { useRouter } from 'next/navigation'
3
3
4
+ import { useMobileScreens } from '@/hooks/use-mobile-screens'
5
+
4
6
import { Button } from './ui'
5
7
6
8
export const BackButton = ( ) => {
7
9
const router = useRouter ( )
10
+ const { isSmallViewPort } = useMobileScreens ( )
8
11
return (
9
- < Button
10
- $background = "none"
11
- $color = "var(--color-black)"
12
- $width = "6%"
13
- $alignItems = "center"
14
- $gap = "1rem"
15
- $padding = "0"
16
- onClick = { ( ) => router . back ( ) }
17
- >
18
- < ArrowLeft size = { 18 } />
19
- </ Button >
12
+ isSmallViewPort && (
13
+ < Button
14
+ $background = "none"
15
+ $color = "var(--color-black)"
16
+ $width = "6%"
17
+ $alignItems = "center"
18
+ $gap = "1rem"
19
+ $padding = "0"
20
+ onClick = { ( ) => router . back ( ) }
21
+ >
22
+ < ArrowLeft size = { 18 } />
23
+ </ Button >
24
+ )
20
25
)
21
26
}
You can’t perform that action at this time.
0 commit comments