Refactor server reducer into TypeScript (#39089)
This commit is contained in:
1 parent
f5b57e8ba7
commit
076c8ec51e
26 files changed
+390
-304
No files matched your search
@@ -84,10 +84,7 @@ const NotificationsButton = () => {
|
||||
const LoginOrSignUp: React.FC = () => {
|
||||
const dispatch = useAppDispatch();
|
||||
const signupUrl = useAppSelector(
|
||||
(state) =>
|
||||
(state.server.getIn(['server', 'registrations', 'url'], null) as
|
||||
| string
|
||||
| null) ?? '/auth/sign_up',
|
||||
(state) => state.server.server.item?.registrations.url ?? '/auth/sign_up',
|
||||
);
|
||||
|
||||
const openClosedRegistrationsModal = useCallback(() => {
|
||||
@@ -95,7 +92,7 @@ const LoginOrSignUp: React.FC = () => {
|
||||
}, [dispatch]);
|
||||
|
||||
useEffect(() => {
|
||||
dispatch(fetchServer());
|
||||
void dispatch(fetchServer());
|
||||
}, [dispatch]);
|
||||
|
||||
if (sso_redirect) {
|
||||
|
||||
@@ -52,7 +52,7 @@ export const ReportCollectionModal: React.FC<{
|
||||
const account = useAccount(account_id);
|
||||
|
||||
useEffect(() => {
|
||||
dispatch(fetchServer());
|
||||
void dispatch(fetchServer());
|
||||
}, [dispatch]);
|
||||
|
||||
const [submitState, setSubmitState] = useState<
|
||||
|
||||
Reference in new issue
Block a user