Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const dataSet = useMemo(() => new DataSet(DataSetFactory({ initValue })), [initValue]);
useEffect(() => {
const tableDs = useMemo(() => {
const [envId, appId] = parentId.split('-');
return new DataSet(TableDataSet({
formatMessage,
intlPrefix,
projectId: id,
envId,
appId,
}));
}, [formatMessage, id, intlPrefix, parentId]);
const value = {
const detailDs = useMemo(() => new DataSet(DetailDataSet()), []);
const retryDs = useMemo(() => new DataSet(RetryDataSet()), []);
const homeDs = useMemo(() => new DataSet(HomeDataSet()), []);
const permissionProjectDs = useMemo(() => new DataSet(PermissionDataSet(intlPrefix, formatMessage, projectId, detailDs)), [projectId, detailDs]);
const optionsDs = useMemo(() => new DataSet(OptionsDataSet()), []);
const formDs = useMemo(() => new DataSet(FormDataSet({ formatMessage, intlPrefix, projectId, clusterId, pvDs })), [projectId, clusterId]);
const baseDs = useMemo(() => new DataSet(BaseDataSet()), []);
const permissionsDs = useMemo(() => new DataSet(PermissionsDataSet({ formatMessage, intlPrefix })), []);
const appInstanceOptionsDs = useMemo(() => new DataSet(AppInstanceOptionsDataSet(projectId, envId, appId, formatMessage)), [projectId, envId, appId]);
const keyOptionsDs = useMemo(() => new DataSet(KeyOptionsDataSet(projectId, envId, appId)), [projectId, envId, appId]);
const importDs = useMemo(() => new DataSet(ImportDataSet(intlPrefix, formatMessage, projectId, selectedDs)), [formatMessage, projectId, selectedDs]);
const listDs = useMemo(() => new DataSet(ListDataSet(intlPrefix, formatMessage, projectId)), [projectId]);