eslint complete!
This commit is contained in:
parent
aa420a1bf2
commit
ac5733a02b
@ -441,7 +441,7 @@ export function useRecoilValueSoftImgSrc(recoilValue: RecoilValue<string>): stri
|
||||
}
|
||||
|
||||
// initialize with a guildsManager
|
||||
export function initRecoil(guildsManager: GuildsManager) {
|
||||
export function useInitRecoil(guildsManager: GuildsManager) {
|
||||
const setGuildsManager = useSetRecoilState(guildsManagerState);
|
||||
const setGuilds = useSetRecoilState(allGuildsState);
|
||||
useEffect(() => {
|
||||
@ -454,6 +454,6 @@ export function initRecoil(guildsManager: GuildsManager) {
|
||||
return () => {
|
||||
guildsManager.off('update-guilds', updateGuilds);
|
||||
};
|
||||
}, [ guildsManager ]);
|
||||
}, [ guildsManager, setGuilds ]);
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import React, { FC, ReactNode } from 'react';
|
||||
import { useRecoilValue } from 'recoil';
|
||||
import GuildsManager from '../guilds-manager';
|
||||
import { initRecoil, overlayState } from './require/atoms';
|
||||
import { useInitRecoil, overlayState } from './require/atoms';
|
||||
import GuildsManagerElement from './sections/guilds-manager';
|
||||
import TitleBar from './sections/title-bar';
|
||||
|
||||
@ -12,7 +12,7 @@ export interface RootElementProps {
|
||||
const RootElement: FC<RootElementProps> = (props: RootElementProps) => {
|
||||
const { guildsManager } = props;
|
||||
|
||||
initRecoil(guildsManager);
|
||||
useInitRecoil(guildsManager);
|
||||
|
||||
const overlay = useRecoilValue<ReactNode>(overlayState);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user