Remove conf values

This commit is contained in:
Yang Luo
2023-06-30 01:38:48 +08:00
parent eee9b8b9fe
commit d31077a510
6 changed files with 15 additions and 25 deletions

View File

@ -17,7 +17,6 @@ import {Select} from "antd";
import i18next from "i18next";
import * as OrganizationBackend from "../../backend/OrganizationBackend";
import * as Setting from "../../Setting";
import * as Conf from "../../Conf";
function OrganizationSelect(props) {
const {onChange, initValue, style, onSelect, withAll, className} = props;
@ -28,9 +27,9 @@ function OrganizationSelect(props) {
if (props.organizations === undefined) {
getOrganizations();
}
window.addEventListener(Conf.StorageOrganizationsChangedEvent, getOrganizations);
window.addEventListener("storageOrganizationsChanged", getOrganizations);
return function() {
window.removeEventListener(Conf.StorageOrganizationsChangedEvent, getOrganizations);
window.removeEventListener("storageOrganizationsChanged", getOrganizations);
};
}, [value]);
@ -59,8 +58,8 @@ function OrganizationSelect(props) {
if (withAll) {
items.unshift({
label: i18next.t(`organization:${Conf.DefaultOrganization}`),
value: Conf.DefaultOrganization,
label: i18next.t("organization:All"),
value: "All",
});
}