diff --git a/src/Pages/Key/Page.tsx b/src/Pages/Key/Page.tsx index 3ca2de9..cefe32d 100644 --- a/src/Pages/Key/Page.tsx +++ b/src/Pages/Key/Page.tsx @@ -41,7 +41,7 @@ function Page() {
- navigate('/key/add')}> + {/* navigate('/key/add')}> */}
diff --git a/src/Pages/Key/View/EditForm.tsx b/src/Pages/Key/View/EditForm.tsx index e2ac4f3..570f2c3 100644 --- a/src/Pages/Key/View/EditForm.tsx +++ b/src/Pages/Key/View/EditForm.tsx @@ -37,7 +37,13 @@ function Form() { return ( - + + + + + + {/* */} + {valueType === "text" ? @@ -46,13 +52,7 @@ function Form() { } - - - - - - - + {/* */} diff --git a/src/Pages/Key/formUtil.ts b/src/Pages/Key/formUtil.ts index 8a8999b..0d96c91 100644 --- a/src/Pages/Key/formUtil.ts +++ b/src/Pages/Key/formUtil.ts @@ -11,7 +11,7 @@ export const getInitialValues = (objectToEdit: any | null = null): any => { key: objectToEdit?.key , type: objectToEdit?.type , value: objectToEdit?.value , - value_type: objectToEdit?.value.startsWith("/") ? "image" : "text" , + value_type: objectToEdit?.key === "home_main_image" ? "image" : "text" , }; diff --git a/src/Pages/Key/useTableColumns.tsx b/src/Pages/Key/useTableColumns.tsx index 024fd88..e180e27 100644 --- a/src/Pages/Key/useTableColumns.tsx +++ b/src/Pages/Key/useTableColumns.tsx @@ -57,7 +57,8 @@ const useTableColumns :any = () => { showEdit onEdit={()=> navigate(`/key/${row.id}`) } showView={false} - onDelete={() => deleteMutation.mutate({ id: row.id })} + showDelete={false} + // onDelete={() => deleteMutation.mutate({ id: row.id })} > ),