fix: clean up dictionaries
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
"use client"
|
||||
|
||||
import { cx } from "class-variance-authority"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { ArrowRightIcon } from "@/components/Icons"
|
||||
|
||||
@@ -13,13 +14,15 @@ import type { CarouselButtonProps } from "./types"
|
||||
export function CarouselPrevious({ className, ...props }: CarouselButtonProps) {
|
||||
const { scrollPrev, canScrollPrev } = useCarousel()
|
||||
|
||||
const intl = useIntl()
|
||||
|
||||
if (!canScrollPrev()) return null
|
||||
|
||||
return (
|
||||
<button
|
||||
className={cx(styles.button, styles.buttonPrev, className)}
|
||||
onClick={scrollPrev}
|
||||
aria-label="Previous slide"
|
||||
aria-label={intl.formatMessage({ id: "Previous slide" })}
|
||||
{...props}
|
||||
>
|
||||
<ArrowRightIcon color="burgundy" className={styles.prevIcon} />
|
||||
@@ -30,13 +33,15 @@ export function CarouselPrevious({ className, ...props }: CarouselButtonProps) {
|
||||
export function CarouselNext({ className, ...props }: CarouselButtonProps) {
|
||||
const { scrollNext, canScrollNext } = useCarousel()
|
||||
|
||||
const intl = useIntl()
|
||||
|
||||
if (!canScrollNext()) return null
|
||||
|
||||
return (
|
||||
<button
|
||||
className={cx(styles.button, styles.buttonNext, className)}
|
||||
onClick={scrollNext}
|
||||
aria-label="Next slide"
|
||||
aria-label={intl.formatMessage({ id: "Next slide" })}
|
||||
{...props}
|
||||
>
|
||||
<ArrowRightIcon color="burgundy" />
|
||||
|
||||
Reference in New Issue
Block a user