Skip to content

Commit

Permalink
๐Ÿ’„ style : ํƒˆํ‡ดํŽ˜์ด์ง€ ์Šคํƒ€์ผ๋ง
Browse files Browse the repository at this point in the history
  • Loading branch information
seondal committed Apr 12, 2024
1 parent 1ea34f6 commit 209f998
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
18 changes: 14 additions & 4 deletions src/app/(Sub)/menu/withdraw/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ import { Popup } from '@/components/Modal';
import { useOverlay } from '@/components/Overlay/useOverlay';
import { withdrawReasonList } from '@/constants/data';

const RadioInput = ({ checked }: { checked: boolean }) => {
return checked ? (
<input type="radio" checked name="reason" className="accent-brand" />
) : (
<input type="radio" name="reason" />
);
};

export default function Page() {
const [withdrawalReason, setWithdrawalReason] = useState<string>();
const [etc, setEtc] = useState(false);
Expand All @@ -22,10 +30,11 @@ export default function Page() {
content={`ํƒˆํ‡ด ์‹œ ์—…๋กœ๋“œํ•œ ํฌ์ฆˆ๋ฅผ ์ œ์™ธํ•œ\n๋ชจ๋“  ์ •๋ณด๊ฐ€ ์‚ญ์ œ๋˜๋ฉฐ ๋ณต๊ตฌ๋˜์ง€ ์•Š์•„์š”.`}
>
<>
<PrimaryButton onClick={exit} text="์ทจ์†Œ" />
<PrimaryButton onClick={exit} text="์ทจ์†Œ" type="secondary" />
<PrimaryButton
text="ํƒˆํ‡ด"
onClick={() => router.replace(`/auth/withdraw?reason=${withdrawalReason}`)}
className="bg-[#EC323E]"
/>
</>
</Popup>
Expand All @@ -51,7 +60,7 @@ export default function Page() {
setEtc(false);
}}
>
{item === withdrawalReason && <span>wow</span>}
<RadioInput checked={item === withdrawalReason} />
<label className="ml-8">{item}</label>
</div>
))}
Expand All @@ -62,15 +71,16 @@ export default function Page() {
setWithdrawalReason(undefined);
}}
>
<RadioInput checked={etc} />
<label className="ml-8">๊ธฐํƒ€</label>
</div>
</form>
{etc && (
<textarea
className="border-border-default outline-border-active"
className="w-full rounded-8 border-2 border-solid border-border-disabled p-16 outline-icon-disabled"
onChange={(e) => setWithdrawalReason(e.target.value)}
value={withdrawalReason}
placeholder="๋– ๋‚˜์‹œ๋Š” ์ด์œ ๋ฅผ ์•Œ๋ ค์ฃผ์„ธ์š”"
placeholder="์ด์œ ๋ฅผ ์•Œ๋ ค์ฃผ์„ธ์š”"
/>
)}
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/app/auth/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function Page() {
setUser(response);
localStorage.setItem('accesstoken', response.token.accessToken);
alert(`๋กœ๊ทธ์ธ์— ์„ฑ๊ณตํ–ˆ์–ด์š”!`);
router.replace('/mypose/bookmark');
router.replace('/menu');
});
}
});
Expand Down

0 comments on commit 209f998

Please sign in to comment.