message: improvement: automatically resume making request after phone submission
diff: @@ -16,6 +16,7 @@ import Map from 'src/components/WebClientMap/WebClientMap';
  import { ProfileState } from 'src/ducks/profile/types';
  import { resetSetRequestState, setRequest } from 'src/ducks/requests/actions';
  import { RequestState } from 'src/ducks/requests/types';
  +import { IRequest, Request } from 'src/models/requests';
  import { IUser } from 'src/models/users';
  import { AppState } from 'src/store';
  import styled from 'styled-components';
  @@ -54,6 +55,14 @@ const NewRequestsContainer: React.FC = () => {
  ({ profile }: { profile: ProfileState }) => profile,
  );
  + const [mapAddress, setMapAddress] = useState<string>(
  + () =>
  + getStreetAddressFromProfile(profileState) || 'Address could not be found',
  + );
  + const [currentLocation, setCurrentLocation] = useState<Coords>(() =>
  + getCoordsFromProfile(profileState),
  + );
  +
  const newRequestState = useSelector(
  ({ requests }: { requests: RequestState }) => requests.setAction,
  );
  @@ -62,6 +71,27 @@ const NewRequestsContainer: React.FC = () => {
  ({ requests }: { requests: RequestState }) => requests.newRequestTemp,
  );
  + const dispatch = useDispatch();
  +
  + useEffect(() => {
  + if (
  + newRequestTemp?.requestPayload &&
  + newRequestTemp.requestPayload instanceof Request &&
  + !newRequestTemp?.requestId &&
  + phoneNumber &&
  + !newRequestState.loading &&
  + !newRequestState.success
  + ) {
  + dispatch(
  + setRequest(
  + newRequestTemp.requestPayload.toObject() as IRequest,
  + undefined,
  + phoneNumber,
  + ),
  + );
  + }
  + }, [phoneNumber, newRequestTemp, dispatch, newRequestState]);
  +
  useEffect(() => {
  if (newRequestTemp && newRequestTemp.requestPayload) {
  setRequestInfo({
  @@ -77,16 +107,6 @@ const NewRequestsContainer: React.FC = () => {
  }
  }, [newRequestTemp]);
  - const [mapAddress, setMapAddress] = useState<string>(
  - () =>
  - getStreetAddressFromProfile(profileState) || 'Address could not be found',
  - );
  - const [currentLocation, setCurrentLocation] = useState<Coords>(() =>
  - getCoordsFromProfile(profileState),
  - );
  -
  - const dispatch = useDispatch();
  -
  useEffect(() => {
  if (newRequestState.success) {
  setShowConfirmationPage(true);
  