Revert "Refactor components to remove forwardRef and simplify props handling"
This reverts commit 1cd013fb94.
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
import { Box, Chip } from "@mui/material";
|
||||
import { useImperativeHandle, useState } from "react";
|
||||
import { forwardRef, useImperativeHandle, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
import { DialogRef } from "@/components/base";
|
||||
import { EditorViewer } from "@/components/profile/editor-viewer";
|
||||
import { getRuntimeYaml } from "@/services/cmds";
|
||||
|
||||
export const ConfigViewer = ({ ref, ..._ }) => {
|
||||
export const ConfigViewer = forwardRef<DialogRef>((_, ref) => {
|
||||
const { t } = useTranslation();
|
||||
const [open, setOpen] = useState(false);
|
||||
const [runtimeConfig, setRuntimeConfig] = useState("");
|
||||
@@ -37,4 +38,4 @@ export const ConfigViewer = ({ ref, ..._ }) => {
|
||||
onClose={() => setOpen(false)}
|
||||
/>
|
||||
);
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user