Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions apps/web/src/assets/icons/NoVoteIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,18 @@ export const NoVoteIcon = () => {
/>
</g>
</g>
<g clip-path="url(#clip0_4956_21575)">
<g clipPath="url(#clip0_4956_21575)">
<path
d="M21.5 26.5L26.4497 21.5503"
stroke="#C3C3C3"
stroke-width="1.5"
stroke-linecap="round"
strokeWidth="1.5"
strokeLinecap="round"
/>
<path
d="M26.5 26.5L21.5503 21.5503"
stroke="#C3C3C3"
stroke-width="1.5"
stroke-linecap="round"
strokeWidth="1.5"
strokeLinecap="round"
/>
</g>
<defs>
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/vote-finish/organism/PlaceItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ export function PlaceItem({
{votedCount > 0 ? (
<>
<div className={Style.imgContainerStyle}>
{members.map(({ id, imageUrl }) => (
{members.map(({ imageUrl }) => (
<Image
key={id}
key={imageUrl}
className={Style.imgStyle}
width={32}
height={32}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export function CardItem({
width: 335,
height: 94,
transition: { delay: 0.5 },
background: "transparent",
background: "#fff",
},
}}
animate={view}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const sliderContainerStyle = style({

export const innerContainerStyle = style({
display: "flex",
zIndex: 10,
});

export const leftArrowContainerStyle = style({
Expand All @@ -26,6 +27,7 @@ export const leftArrowContainerStyle = style({
display: "flex",
flexDirection: "column",
alignItems: "center",
zIndex: 20,
});

export const rightArrowContainerStyle = style({
Expand All @@ -36,6 +38,7 @@ export const rightArrowContainerStyle = style({
display: "flex",
flexDirection: "column",
alignItems: "center",
zIndex: 20,
});

export const arrowStationStyle = style({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { style } from "@vanilla-extract/css";

export const containerStyle = style({
position: "absolute",
zIndex: 10,
top: 0,
left: 0,
width: "100%",
Expand Down
55 changes: 17 additions & 38 deletions apps/web/src/components/vote-voting/organism/useViewTransform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,57 +13,36 @@ export function useViewTransform({
focusedCarouselIndex,
}: Props) {
const cardToList = useCallback(() => {
new Array(listLength + 1).fill(0).forEach((_, index) => {
new Array(listLength + 2).fill(0).forEach((_, index) => {
const width = Math.min(600, window.innerWidth);
if (index === focusedCarouselIndex) {
return;
} else if (index < focusedCarouselIndex) {
animate(
`.card-${index}`,
{
x: width * (focusedCarouselIndex - index),
},
{ ease: [0, 0, 1, 1], duration: 0.3 }
);
} else if (index > focusedCarouselIndex) {
animate(
`.card-${index}`,
{
x: width * (focusedCarouselIndex - index),
},
{ ease: [0, 0, 1, 1], duration: 0.3 }
);
}
animate(
`.card-${index}`,
{
x: width * (focusedCarouselIndex - index),
},
{ ease: [0, 0, 1, 1], duration: 0.3 }
);
});
}, [focusedCarouselIndex, listLength]);

const listToCard = useCallback(async () => {
const timeout = setTimeout(() => {
new Array(listLength + 1).fill(0).forEach((_, index) => {
if (index === focusedCarouselIndex) {
return;
} else if (index < focusedCarouselIndex) {
animate(
`.card-${index}`,
{
x: 0,
},
{ ease: [0, 0, 1, 1], duration: 0.3 }
);
} else if (index > focusedCarouselIndex) {
animate(
`.card-${index}`,
{
x: 0,
},
{ ease: [0, 0, 1, 1], duration: 0.3 }
);
}
new Array(listLength + 2).fill(0).forEach((_, index) => {
animate(
`.card-${index}`,
{
x: 0,
},
{ ease: [0, 0, 1, 1], duration: 0.3 }
);
});
}, 1100);

return () => clearTimeout(timeout);
}, [focusedCarouselIndex, listLength]);
}, [listLength]);

useEffect(() => {
if (view === "list") {
Expand Down