mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-15 17:43:08 -04:00
Merge remote-tracking branch 'upstream/dev' into dev
# Conflicts: # eslint.config.mjs # package.json # pnpm-lock.yaml # src/components/PluginSettings/index.tsx # src/plugins/imageZoom/index.tsx # src/plugins/messageLogger/index.tsx # src/plugins/pictureInPicture/index.tsx # src/plugins/serverInfo/GuildInfoModal.tsx # src/plugins/whoReacted/index.tsx
This commit is contained in:
commit
f8879cc801
114 changed files with 2092 additions and 893 deletions
|
@ -17,6 +17,7 @@
|
|||
*/
|
||||
|
||||
import { React, useEffect, useMemo, useReducer, useState } from "@webpack/common";
|
||||
import { ActionDispatch } from "react";
|
||||
|
||||
import { checkIntersecting } from "./misc";
|
||||
|
||||
|
@ -117,8 +118,8 @@ export function useAwaiter<T>(factory: () => Promise<T>, providedOpts?: AwaiterO
|
|||
/**
|
||||
* Returns a function that can be used to force rerender react components
|
||||
*/
|
||||
export function useForceUpdater(): () => void;
|
||||
export function useForceUpdater(withDep: true): [unknown, () => void];
|
||||
export function useForceUpdater(): ActionDispatch<[]>;
|
||||
export function useForceUpdater(withDep: true): [any, ActionDispatch<[]>];
|
||||
export function useForceUpdater(withDep?: true) {
|
||||
const r = useReducer(x => x + 1, 0);
|
||||
return withDep ? r : r[1];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue