iipbs_cs #13

Merged
chanii8 merged 25 commits from iipbs_cs into main 2025-03-31 10:41:31 +09:00
8 changed files with 15 additions and 22 deletions
Showing only changes of commit 5b4e674214 - Show all commits
@@ -17,11 +17,7 @@ import {
} from "@/shared/ui/form";
import type { MenuFormData } from "../model/menu-interface";
export function BaseBottomMenuForm({
form,
}: {
form: UseFormReturn<MenuFormData>;
}) {
export function BaseTypeForm({ form }: { form: UseFormReturn<MenuFormData> }) {
const handleIconClick = (icon: string) => {
form.setValue("iconNm", icon);
};
@@ -16,7 +16,7 @@ import {
FormMessage,
} from "@/shared/ui/form";
import type { MenuFormData } from "../model/menu-interface";
import { BaseBottomMenuForm } from "./base-bottom-menu-form";
import { BaseTypeForm } from "./base-type-form";
export function BoardMenuForm({ form }: { form: UseFormReturn<MenuFormData> }) {
return (
@@ -97,7 +97,7 @@ export function BoardMenuForm({ form }: { form: UseFormReturn<MenuFormData> }) {
</TableCell>
</TableRow>
<BaseBottomMenuForm form={form} />
<BaseTypeForm form={form} />
<TableRow>
<TableHead>QR코드</TableHead>
@@ -1,7 +1,7 @@
import { type UseFormReturn } from "react-hook-form";
import { Table, TableBody } from "@common/components";
import type { MenuFormData } from "../model/menu-interface";
import { BaseBottomMenuForm } from "./base-bottom-menu-form";
import { BaseTypeForm } from "./base-type-form";
export function BottomMenuForm({
form,
@@ -15,7 +15,7 @@ export function BottomMenuForm({
<col width="80%" />
</colgroup>
<TableBody>
<BaseBottomMenuForm form={form} />
<BaseTypeForm form={form} />
</TableBody>
</Table>
);
@@ -16,7 +16,7 @@ import {
FormMessage,
} from "@/shared/ui/form";
import type { MenuFormData } from "../model/menu-interface";
import { BaseBottomMenuForm } from "./base-bottom-menu-form";
import { BaseTypeForm } from "./base-type-form";
export function ContentMenuForm({
form,
@@ -101,7 +101,7 @@ export function ContentMenuForm({
</TableCell>
</TableRow>
<BaseBottomMenuForm form={form} />
<BaseTypeForm form={form} />
<TableRow>
<TableHead>QR코드</TableHead>
@@ -1,7 +1,7 @@
import { type UseFormReturn } from "react-hook-form";
import { Table, TableBody } from "@common/components";
import type { MenuFormData } from "../model/menu-interface";
import { BaseBottomMenuForm } from "./base-bottom-menu-form";
import { BaseTypeForm } from "./base-type-form";
export function EmptyMenuForm({ form }: { form: UseFormReturn<MenuFormData> }) {
return (
@@ -11,7 +11,7 @@ export function EmptyMenuForm({ form }: { form: UseFormReturn<MenuFormData> }) {
<col width="80%" />
</colgroup>
<TableBody>
<BaseBottomMenuForm form={form} />
<BaseTypeForm form={form} />
</TableBody>
</Table>
);
@@ -1,7 +1,7 @@
import { type UseFormReturn } from "react-hook-form";
import { Table, TableBody } from "@common/components";
import type { MenuFormData } from "../model/menu-interface";
import { BaseBottomMenuForm } from "./base-bottom-menu-form";
import { BaseTypeForm } from "./base-type-form";
export function InsideMenuForm({
form,
@@ -15,7 +15,7 @@ export function InsideMenuForm({
<col width="80%" />
</colgroup>
<TableBody>
<BaseBottomMenuForm form={form} />
<BaseTypeForm form={form} />
</TableBody>
</Table>
);
+2 -5
View File
@@ -67,7 +67,7 @@ export function MenuForm({
<div className="card">
<BaseMenuForm form={form} menuId={menuId} />
<div className="-mt-[0.1rem]">
{renderMenuTypeComponent(menuType, form)}
{renderTypeForm(menuType, form)}
</div>
</div>
</div>
@@ -88,10 +88,7 @@ export function MenuForm({
);
}
function renderMenuTypeComponent(
menuType: string,
form: UseFormReturn<MenuFormData>,
) {
function renderTypeForm(menuType: string, form: UseFormReturn<MenuFormData>) {
switch (menuType) {
case MENU_TYPE.EMPTY:
return <EmptyMenuForm form={form} />;
@@ -1,7 +1,7 @@
import { type UseFormReturn } from "react-hook-form";
import { Table, TableBody } from "@common/components";
import type { MenuFormData } from "../model/menu-interface";
import { BaseBottomMenuForm } from "./base-bottom-menu-form";
import { BaseTypeForm } from "./base-type-form";
export function OutsideMenuForm({
form,
@@ -15,7 +15,7 @@ export function OutsideMenuForm({
<col width="80%" />
</colgroup>
<TableBody>
<BaseBottomMenuForm form={form} />
<BaseTypeForm form={form} />
</TableBody>
</Table>
);