rename: base bottom form 이름 변경

This commit is contained in:
2025-03-26 11:00:24 +09:00
parent f94b8a3f8e
commit 5b4e674214
8 changed files with 15 additions and 22 deletions
@@ -17,11 +17,7 @@ import {
} from "@/shared/ui/form"; } from "@/shared/ui/form";
import type { MenuFormData } from "../model/menu-interface"; import type { MenuFormData } from "../model/menu-interface";
export function BaseBottomMenuForm({ export function BaseTypeForm({ form }: { form: UseFormReturn<MenuFormData> }) {
form,
}: {
form: UseFormReturn<MenuFormData>;
}) {
const handleIconClick = (icon: string) => { const handleIconClick = (icon: string) => {
form.setValue("iconNm", icon); form.setValue("iconNm", icon);
}; };
@@ -16,7 +16,7 @@ import {
FormMessage, FormMessage,
} from "@/shared/ui/form"; } from "@/shared/ui/form";
import type { MenuFormData } from "../model/menu-interface"; 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> }) { export function BoardMenuForm({ form }: { form: UseFormReturn<MenuFormData> }) {
return ( return (
@@ -97,7 +97,7 @@ export function BoardMenuForm({ form }: { form: UseFormReturn<MenuFormData> }) {
</TableCell> </TableCell>
</TableRow> </TableRow>
<BaseBottomMenuForm form={form} /> <BaseTypeForm form={form} />
<TableRow> <TableRow>
<TableHead>QR코드</TableHead> <TableHead>QR코드</TableHead>
@@ -1,7 +1,7 @@
import { type UseFormReturn } from "react-hook-form"; import { type UseFormReturn } from "react-hook-form";
import { Table, TableBody } from "@common/components"; import { Table, TableBody } from "@common/components";
import type { MenuFormData } from "../model/menu-interface"; import type { MenuFormData } from "../model/menu-interface";
import { BaseBottomMenuForm } from "./base-bottom-menu-form"; import { BaseTypeForm } from "./base-type-form";
export function BottomMenuForm({ export function BottomMenuForm({
form, form,
@@ -15,7 +15,7 @@ export function BottomMenuForm({
<col width="80%" /> <col width="80%" />
</colgroup> </colgroup>
<TableBody> <TableBody>
<BaseBottomMenuForm form={form} /> <BaseTypeForm form={form} />
</TableBody> </TableBody>
</Table> </Table>
); );
@@ -16,7 +16,7 @@ import {
FormMessage, FormMessage,
} from "@/shared/ui/form"; } from "@/shared/ui/form";
import type { MenuFormData } from "../model/menu-interface"; import type { MenuFormData } from "../model/menu-interface";
import { BaseBottomMenuForm } from "./base-bottom-menu-form"; import { BaseTypeForm } from "./base-type-form";
export function ContentMenuForm({ export function ContentMenuForm({
form, form,
@@ -101,7 +101,7 @@ export function ContentMenuForm({
</TableCell> </TableCell>
</TableRow> </TableRow>
<BaseBottomMenuForm form={form} /> <BaseTypeForm form={form} />
<TableRow> <TableRow>
<TableHead>QR코드</TableHead> <TableHead>QR코드</TableHead>
@@ -1,7 +1,7 @@
import { type UseFormReturn } from "react-hook-form"; import { type UseFormReturn } from "react-hook-form";
import { Table, TableBody } from "@common/components"; import { Table, TableBody } from "@common/components";
import type { MenuFormData } from "../model/menu-interface"; 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> }) { export function EmptyMenuForm({ form }: { form: UseFormReturn<MenuFormData> }) {
return ( return (
@@ -11,7 +11,7 @@ export function EmptyMenuForm({ form }: { form: UseFormReturn<MenuFormData> }) {
<col width="80%" /> <col width="80%" />
</colgroup> </colgroup>
<TableBody> <TableBody>
<BaseBottomMenuForm form={form} /> <BaseTypeForm form={form} />
</TableBody> </TableBody>
</Table> </Table>
); );
@@ -1,7 +1,7 @@
import { type UseFormReturn } from "react-hook-form"; import { type UseFormReturn } from "react-hook-form";
import { Table, TableBody } from "@common/components"; import { Table, TableBody } from "@common/components";
import type { MenuFormData } from "../model/menu-interface"; import type { MenuFormData } from "../model/menu-interface";
import { BaseBottomMenuForm } from "./base-bottom-menu-form"; import { BaseTypeForm } from "./base-type-form";
export function InsideMenuForm({ export function InsideMenuForm({
form, form,
@@ -15,7 +15,7 @@ export function InsideMenuForm({
<col width="80%" /> <col width="80%" />
</colgroup> </colgroup>
<TableBody> <TableBody>
<BaseBottomMenuForm form={form} /> <BaseTypeForm form={form} />
</TableBody> </TableBody>
</Table> </Table>
); );
+2 -5
View File
@@ -67,7 +67,7 @@ export function MenuForm({
<div className="card"> <div className="card">
<BaseMenuForm form={form} menuId={menuId} /> <BaseMenuForm form={form} menuId={menuId} />
<div className="-mt-[0.1rem]"> <div className="-mt-[0.1rem]">
{renderMenuTypeComponent(menuType, form)} {renderTypeForm(menuType, form)}
</div> </div>
</div> </div>
</div> </div>
@@ -88,10 +88,7 @@ export function MenuForm({
); );
} }
function renderMenuTypeComponent( function renderTypeForm(menuType: string, form: UseFormReturn<MenuFormData>) {
menuType: string,
form: UseFormReturn<MenuFormData>,
) {
switch (menuType) { switch (menuType) {
case MENU_TYPE.EMPTY: case MENU_TYPE.EMPTY:
return <EmptyMenuForm form={form} />; return <EmptyMenuForm form={form} />;
@@ -1,7 +1,7 @@
import { type UseFormReturn } from "react-hook-form"; import { type UseFormReturn } from "react-hook-form";
import { Table, TableBody } from "@common/components"; import { Table, TableBody } from "@common/components";
import type { MenuFormData } from "../model/menu-interface"; import type { MenuFormData } from "../model/menu-interface";
import { BaseBottomMenuForm } from "./base-bottom-menu-form"; import { BaseTypeForm } from "./base-type-form";
export function OutsideMenuForm({ export function OutsideMenuForm({
form, form,
@@ -15,7 +15,7 @@ export function OutsideMenuForm({
<col width="80%" /> <col width="80%" />
</colgroup> </colgroup>
<TableBody> <TableBody>
<BaseBottomMenuForm form={form} /> <BaseTypeForm form={form} />
</TableBody> </TableBody>
</Table> </Table>
); );