This commit is contained in:
thororen1234 2024-07-12 15:59:55 -04:00
parent 1e079a70e9
commit d23b8af79a
4 changed files with 7 additions and 22 deletions

View file

@ -5,7 +5,6 @@
*/
import ErrorBoundary from "@components/ErrorBoundary";
import { onceDefined } from "@shared/onceDefined";
import { Devs } from "@utils/constants";
import { getCurrentChannel } from "@utils/discord";
import { Logger } from "@utils/Logger";
@ -19,15 +18,7 @@ const getCreatedAtDate = findByCodeLazy('month:"short",day:"numeric"');
const locale = findByPropsLazy("getLocale");
const lastSection = findByPropsLazy("lastSection");
let section;
onceDefined(window, "GLOBAL_ENV", v => {
if (v.RELEASE_CHANNEL === "stable") {
section = findLazy((m: any) => m.section !== void 0 && Object.values(m).length === 1);
} else {
section = findLazy((m: any) => m.section !== void 0 && m.heading !== void 0 && Object.values(m).length === 2);
}
});
const section = findLazy((m: any) => m.section !== void 0 && m.heading !== void 0 && Object.values(m).length === 2);
export default definePlugin({
name: "FriendsSince",