|
2 | 2 |
|
3 | 3 | import { type PropsWithChildren } from 'react'; |
4 | 4 | import Image from 'next/image'; |
5 | | -import { cn } from '@gitanimals/ui-tailwind'; |
6 | 5 | import { guildQueries } from '@gitanimals/react-query'; |
| 6 | +import { cn } from '@gitanimals/ui-tailwind'; |
7 | 7 | import { wrap } from '@suspensive/react'; |
8 | 8 | import { useQuery } from '@tanstack/react-query'; |
9 | 9 |
|
@@ -42,35 +42,22 @@ export const GuildSliderContainer = wrap.ErrorBoundary({ fallback: <>{}</> }).on |
42 | 42 | }, |
43 | 43 | ); |
44 | 44 |
|
45 | | -const containerStyle = cn( |
46 | | - 'w-full h-fit relative' |
47 | | -); |
| 45 | +const containerStyle = cn('w-full h-fit relative'); |
48 | 46 |
|
49 | 47 | function CarouselButton({ direction, disabled }: { direction: 'left' | 'right'; disabled?: boolean }) { |
50 | 48 | const imgSrc = disabled ? '/common/carousel-inner-right-disabled.png' : '/common/carousel-inner-right.png'; |
51 | 49 | return ( |
52 | 50 | <button |
53 | 51 | disabled={disabled} |
54 | | - className={cn( |
55 | | - buttonStyle, |
56 | | - direction === 'left' && leftButtonStyle, |
57 | | - direction === 'right' && rightButtonStyle |
58 | | - )} |
| 52 | + className={cn(buttonStyle, direction === 'left' && leftButtonStyle, direction === 'right' && rightButtonStyle)} |
59 | 53 | > |
60 | 54 | <Image width={40} height={40} src={imgSrc} alt={direction} /> |
61 | 55 | </button> |
62 | 56 | ); |
63 | 57 | } |
64 | 58 |
|
65 | | -const buttonStyle = cn( |
66 | | - 'absolute top-0 bottom-0 m-auto', |
67 | | - 'disabled:cursor-not-allowed' |
68 | | -); |
| 59 | +const buttonStyle = cn('absolute top-0 bottom-0 m-auto', 'disabled:cursor-not-allowed'); |
69 | 60 |
|
70 | | -const leftButtonStyle = cn( |
71 | | - 'left-[-66px] rotate-180' |
72 | | -); |
| 61 | +const leftButtonStyle = cn('left-[-66px] rotate-180'); |
73 | 62 |
|
74 | | -const rightButtonStyle = cn( |
75 | | - 'right-[-66px]' |
76 | | -); |
| 63 | +const rightButtonStyle = cn('right-[-66px]'); |
0 commit comments