NewGroup: fix redirect

This commit is contained in:
Liam Fitzgerald 2021-05-10 14:52:40 +10:00
parent bb03b6f278
commit 840c3bfb98
No known key found for this signature in database
GPG Key ID: D390E12C61D1CFFB

View File

@ -6,7 +6,7 @@ import {
import { Enc, GroupPolicy } from '@urbit/api';
import { Form, Formik, FormikHelpers } from 'formik';
import React, { ReactElement, useCallback } from 'react';
import { RouteComponentProps } from 'react-router-dom';
import { RouteComponentProps, useHistory } from 'react-router-dom';
import * as Yup from 'yup';
import GlobalApi from '~/logic/api/global';
import { useWaitForProps } from '~/logic/lib/useWaitForProps';
@ -32,7 +32,8 @@ interface NewGroupProps {
}
export function NewGroup(props: NewGroupProps & RouteComponentProps): ReactElement {
const { api, history } = props;
const { api } = props;
const history = useHistory();
const initialValues: FormSchema = {
title: '',
description: '',