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

[Fix] 전체적인 UI 오류 수정 #168

Merged
merged 3 commits into from
Aug 19, 2024
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
16 changes: 9 additions & 7 deletions client/src/features/Main/Lottery.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,15 @@ function Lottery({ id }: SectionKeyProps) {
</div>
</div>
</div>
<Link
to="/lottery/show-case"
className="flex w-[1200px] justify-end gap-1 h-body-1-regular text-n-neutral-500 hover:underline"
>
<p>다른 사람들의 스마일 로봇 뱃지 보러가기</p>
<ArrowRightIcon stroke="#637381" />
</Link>
<div className="flex justify-end">
<Link
to="/lottery/show-case"
className="flex gap-1 hover:underline h-body-1-regular text-n-neutral-500"
>
<p>다른 사람들의 스마일 로봇 뱃지 보러가기</p>
<ArrowRightIcon stroke="#637381" />
</Link>
</div>
</Section>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ interface BarProps extends BarVariantsProps {
export default function RushBar({ ratio, color, status, textAlign }: BarProps) {
return (
<span className={barVariants({ color, status, textAlign })} style={{ width: `${ratio}%` }}>
<p className="px-3">{ratio}%</p>
<p className="px-3 z-40">{ratio}%</p>
</span>
);
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { cva } from "class-variance-authority";
import Tooltip from "@/components/Tooltip";
import { CARD_OPTION } from "@/constants/Rush/rushCard.ts";
import RushCurrentOptionDisplay from "@/features/RushGame/RushGameComponents/RushCurrentOptionDisplay.tsx";
Expand All @@ -7,6 +8,18 @@ import useToggleContents from "@/hooks/useToggleContents.ts";
import { CardOption } from "@/types/rushGame.ts";
import Reload from "/public/assets/icons/reload.svg?react";

const tooltipVariants = cva(`absolute transition-opacity duration-300 ease-in-out`, {
variants: {
visible: {
true: "opacity-1 visibility-visible",
false: "opacity-0 visibility-hidden",
},
},
defaultVariants: {
visible: true,
},
});

const TOOLTIP_CONTENT = () => (
<>
새로고침을 눌러
Expand Down Expand Up @@ -77,17 +90,12 @@ export default function RushCardCurrentRatio() {
/>
</div>
<div className="absolute right-6 bottom-6">
{toggleContents ? (
<Tooltip content={TOOLTIP_CONTENT()} tooltipPosition="left">
<button onClick={fetchRushBalance}>
<Reload />
</button>
</Tooltip>
) : (
<button onClick={fetchRushBalance}>
<Reload />
</button>
)}
<div className={tooltipVariants({ visible: toggleContents })}>
<Tooltip content={TOOLTIP_CONTENT()} tooltipPosition="left" />
</div>
<button onClick={fetchRushBalance}>
<Reload />
</button>
Comment on lines +93 to +98
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오오 요렇게 하니까 button 두 개 안 만들어도 되고 좋네용👍

</div>
</div>
);
Expand Down
Loading