Skip to content

Commit 8eb123c

Browse files
committed
removing unused methods
1 parent 5e50457 commit 8eb123c

File tree

1 file changed

+0
-36
lines changed

1 file changed

+0
-36
lines changed

frontend/src/components/metadata/widgets/MetadataTextField.tsx

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -30,24 +30,6 @@ export const MetadataTextField = (props) => {
3030
const [readOnly, setReadOnly] = useState(initialReadOnly);
3131
const [inputChanged, setInputChanged] = useState(false);
3232

33-
// Get the display value for read-only mode
34-
const getDisplayValue = () => {
35-
if (!readOnly) return null;
36-
37-
// First check if content has the field
38-
if (content && content[fieldName] !== undefined && content[fieldName] !== null) {
39-
return content[fieldName];
40-
}
41-
42-
// If not, check if localContent has it (for newly added fields)
43-
if (localContent && localContent[fieldName] !== undefined && localContent[fieldName] !== null) {
44-
return localContent[fieldName];
45-
}
46-
47-
// If neither has the field, show "null"
48-
return "null";
49-
};
50-
5133
const getValue = () => {
5234
if (readOnly) {
5335
// Read-only mode: show content or "null"
@@ -65,24 +47,6 @@ export const MetadataTextField = (props) => {
6547
}
6648
};
6749

68-
// Get the value for the text field
69-
const getValue2 = () => {
70-
if (readOnly) {
71-
// Read-only mode: show content or "null"
72-
if (content && content[fieldName] !== undefined && content[fieldName] !== null) {
73-
return content[fieldName];
74-
}
75-
if (localContent && localContent[fieldName] !== undefined && localContent[fieldName] !== null) {
76-
return localContent[fieldName];
77-
}
78-
return "null";
79-
} else {
80-
// Edit mode: show localContent value (what user is typing)
81-
return localContent[fieldName] || "";
82-
}
83-
};
84-
85-
8650
return (
8751
<Grid container spacing={2} sx={{ alignItems: "center" }}>
8852
<Grid item xs={11} sm={11} md={11} lg={11} xl={11}>

0 commit comments

Comments
 (0)