Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FE] simulatorのprogressを左右反転(左→右)する #643

Merged
merged 1 commit into from
Dec 5, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -137,33 +137,36 @@ const ChairProgress: FC<{
<div className="flex items-center">
<div className="flex border-b pb-1 w-full">
<div className="flex w-1/2">
<PinIcon color={colors.red[500]} width={20} />
<div className="relative w-full ms-6">
<div className="relative w-full me-6">
{rideStatus &&
["PICKUP", "CARRYING", "ARRIVED"].includes(rideStatus) && (
["MATCHING", "COMPLETED", "ENROUTE"].includes(rideStatus) && (
<ChairIcon
model={model}
className={`size-6 absolute top-[-2px] ${rideStatus === "CARRYING" ? "animate-shake" : ""}`}
style={{ right: `${progressToDestination}%` }}
className={twMerge(
"scale-x-[-1] size-6 absolute top-[-2px]",
rideStatus === "ENROUTE" && "animate-shake",
)}
style={{ left: `${progressToPickup}%` }}
/>
)}
</div>
<PinIcon color={colors.black} width={20} />
</div>
<div className="flex w-1/2">
<PinIcon color={colors.black} width={20} />
<div className="relative w-full ms-6">
<div className="relative w-full me-6">
{rideStatus &&
["MATCHING", "COMPLETED", "ENROUTE"].includes(rideStatus) && (
["PICKUP", "CARRYING", "ARRIVED"].includes(rideStatus) && (
<ChairIcon
model={model}
className={twMerge(
"size-6 absolute top-[-2px]",
rideStatus === "ENROUTE" && "animate-shake",
"scale-x-[-1] size-6 absolute top-[-2px]",
rideStatus === "CARRYING" && "animate-shake",
)}
style={{ right: `${progressToPickup}%` }}
style={{ left: `${progressToDestination}%` }}
/>
)}
</div>
<PinIcon color={colors.red[500]} width={20} />
</div>
</div>
</div>
Expand Down