Remove routerHistory parameters from composer actions (#31077)

This commit is contained in:
Claire 2024-07-19 17:26:44 +02:00 committed by GitHub
parent adadfdbc03
commit e768b23aa9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 91 additions and 100 deletions

View file

@ -3,7 +3,7 @@ import { useCallback } from 'react';
import { FormattedMessage, useIntl, defineMessages } from 'react-intl';
import { Helmet } from 'react-helmet';
import { Link, Switch, Route, useHistory } from 'react-router-dom';
import { Link, Switch, Route } from 'react-router-dom';
import { useDispatch } from 'react-redux';
@ -35,11 +35,10 @@ const Onboarding = () => {
const account = useAppSelector(state => state.getIn(['accounts', me]));
const dispatch = useDispatch();
const intl = useIntl();
const history = useHistory();
const handleComposeClick = useCallback(() => {
dispatch(focusCompose(history, intl.formatMessage(messages.template)));
}, [dispatch, intl, history]);
dispatch(focusCompose(intl.formatMessage(messages.template)));
}, [dispatch, intl]);
return (
<Column>