Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
chaeseungyun committed Nov 20, 2024
2 parents 0596ab9 + 1c84193 commit fea0737
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/model/shopInfo/allShopInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const Shop = z.object({
pay_bank: z.boolean(),
pay_card: z.boolean(),
open: z.array(Open),
main_category_id: z.number(),
category_ids: z.array(z.number()),
});

Expand Down
1 change: 1 addition & 0 deletions src/page/MyShopPage/components/EditShopInfoModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export default function EditShopInfoModal({

const handleCategoryIdChange = (e: React.ChangeEvent<HTMLSelectElement>) => {
setValue('category_ids', [Number(e.target.value), 0]);
setValue('main_category_id', Number(e.target.value));
};

const handleDeleteImage = (image: string) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export default function Category() {

const handleCategoryClick = (categoryInfo: CategoryProps) => {
setValue('category_ids', [categoryInfo.id, 0]);
setValue('main_category_id', categoryInfo.id);
};

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export default function ShopCategory({ onNext }:{ onNext: () => void }) {

const handleCategoryClick = (categoryInfo: CategoryProps) => {
setValue('category_ids', [categoryInfo.id, 0]);
setValue('main_category_id', categoryInfo.id);
};

const handleNextClick = () => {
Expand Down

0 comments on commit fea0737

Please sign in to comment.