Skip to content

Commit

Permalink
chore: fix storybook and sonar cloud issue
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnsonMao committed Oct 26, 2024
1 parent decb2b0 commit 73f812c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
7 changes: 5 additions & 2 deletions components/shared/Carousel/v2/Carousel.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ const meta: Meta<typeof Carousel> = {
},
],
args: {
renderKey: (props: any) => props.name,
items: [{ name: "TEST 1" }, { name: "TEST 2" }, { name: "TEST 3" }],
items: [
{ id: 1, name: "TEST 1" },
{ id: 2, name: "TEST 2" },
{ id: 3, name: "TEST 3" },
],
Component: Card,
},
argTypes: {
Expand Down
2 changes: 1 addition & 1 deletion components/shared/Carousel/v2/CarouselContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export function CarouselProvider<Item extends TItem>({
items,
Component,
renderKey = (item) => item.id,
}: CarouselProviderProps<Item>) {
}: Readonly<CarouselProviderProps<Item>>) {
const [state, dispatch] = useReducer(reducer<Item>, {
...initialState,
items,
Expand Down
2 changes: 2 additions & 0 deletions pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ function CarouselCard({
<div
className="flex text-white px-12 gap-4"
onMouseLeave={() => setOpen(false)}
role="menuitem"
>
<div className="relative flex items-end justify-end flex-[60%]">
<Image
Expand Down Expand Up @@ -103,6 +104,7 @@ function CarouselCard({
<div
className="absolute bottom-full right-0 mb-2"
onMouseLeave={() => setOpen(false)}
role="menuitem"
>
<ul className="py-4 effect-new-2 text-primary-800 bg-primary-200/60 whitespace-nowrap rounded-lg">
<li>
Expand Down

0 comments on commit 73f812c

Please sign in to comment.