[skip ci] Refactor utils

This commit is contained in:
Vendicated 2023-05-06 01:36:00 +02:00
parent 2834bed518
commit 0d5e2d0696
No known key found for this signature in database
GPG key ID: A1DC0CFB5615D905
110 changed files with 341 additions and 327 deletions

View file

@ -16,11 +16,12 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { classes, LazyComponent } from "@utils/misc";
import { classes } from "@utils/misc";
import { LazyComponent } from "@utils/react";
import { findByProps } from "@webpack";
export default LazyComponent(() => {
const { button, dangerous } = findByProps("button", "wrapper", "disabled","separator");
const { button, dangerous } = findByProps("button", "wrapper", "disabled", "separator");
return function MessageButton(props) {
return props.type === "delete"

View file

@ -16,8 +16,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { Settings } from "@api/settings";
import { classes, LazyComponent } from "@utils/misc";
import { Settings } from "@api/Settings";
import { classes } from "@utils/misc";
import { LazyComponent } from "@utils/react";
import { filters, findBulk } from "@webpack";
import { Alerts, moment, Timestamp, UserStore } from "@webpack/common";

View file

@ -16,8 +16,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { Settings } from "@api/settings";
import { classes, useAwaiter } from "@utils/misc";
import { Settings } from "@api/Settings";
import { classes } from "@utils/misc";
import { useAwaiter } from "@utils/react";
import { findLazy } from "@webpack";
import { Forms, React, Text, UserStore } from "@webpack/common";
import type { KeyboardEvent } from "react";