Skip to content

Commit e82822e

Browse files
committed
[fix] 칵테일 드롭다운 수정사항 반영
1 parent f2aedea commit e82822e

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

src/domains/recipe/details/DetailItem.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,16 @@ function DetailItem({ name, nameKo, story, src, abv, glassType }: Props) {
3535
<div className="flex flex-col gap-1 items-center md:items-end md:w-1/2">
3636
<span>{alcoholTitle && <Label title={alcoholTitle} />}</span>
3737
<h2 className="flex flex-col gap-2">
38-
<span className="w-fit font-serif font-bold text-right text-3xl lg:text-4xl text-secondary ">
38+
<span className="w-fit font-serif font-bold text-center md:text-right text-3xl lg:text-4xl text-secondary ">
3939
{name}
4040
</span>
41-
<span className="font-serif font-bold text-right text-xl lg:whitespace-nowrap lg:text-4xl text-secondary">
41+
<span className="font-serif font-bold text-center md:text-right text-xl lg:whitespace-nowrap lg:text-4xl text-secondary">
4242
{nameKo}
4343
</span>
4444
</h2>
4545
</div>
4646

47-
<p className=" text-base self-center w-3/4 md:text-sm md:self-end text-secondary md:w-70 lg:text-base lg:w-100">
47+
<p className=" text-base self-center md:w-1/2 md:text-sm md:self-end text-secondary lg:text-base lg:w-100">
4848
{story}
4949
</p>
5050

src/domains/shared/components/keep/Keep.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import KeepIcon from '@/shared/assets/icons/keep_36.svg';
44
import KeepIconActive from '@/shared/assets/icons/keep_active_36.svg';
55
import { useState } from 'react';
66
import { deleteKeep, postKeep } from '../../api/keep/keep';
7+
import { useToast } from '@/shared/hook/useToast';
78

89
interface Props {
910
className?: string;
@@ -13,6 +14,7 @@ interface Props {
1314
// 만약 타입 안맞는다면 그냥 두셔도 됩니다.
1415

1516
function Keep({ className, cocktailId }: Props) {
17+
const { toastSuccess } = useToast();
1618
const [isClick, setIsClick] = useState(false);
1719

1820
const handleClick = async (e: React.MouseEvent<HTMLButtonElement>) => {
@@ -25,8 +27,10 @@ function Keep({ className, cocktailId }: Props) {
2527
if (!cocktailId) return;
2628
if (!isClick) {
2729
await postKeep(cocktailId);
30+
toastSuccess('저장에 성공하셨습니다.');
2831
} else {
2932
await deleteKeep(cocktailId);
33+
toastSuccess('저장을 취소하셨습니다.');
3034
}
3135
} catch (err) {
3236
console.error(err);

src/shared/components/select-box/SelectBox.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ function SelectBox({ id, groupKey, ref, option, title, value, onChange, use }: P
8888
</button>
8989

9090
<ul
91-
className={`w-30 text-gray-dark p-2 rounded-xl z-99 duration-200 absolute transition-all
91+
className={`w-fit min-w-30 text-gray-dark p-2 rounded-xl z-99 duration-200 absolute transition-all
9292
${
9393
groupKey
9494
? localOpen
@@ -104,7 +104,7 @@ function SelectBox({ id, groupKey, ref, option, title, value, onChange, use }: P
104104
<li
105105
key={v + i}
106106
role="option"
107-
className="cursor-pointer p-1 hover:bg-secondary aria-selected:bg-secondary"
107+
className="cursor-pointer whitespace-nowrap p-1 hover:bg-secondary aria-selected:bg-secondary"
108108
onClick={() => handleChoose(v)}
109109
aria-selected={v === select}
110110
>

0 commit comments

Comments
 (0)