From 840c3bfb9846f48a444b8b4a78e3c1d36c40d963 Mon Sep 17 00:00:00 2001 From: Liam Fitzgerald Date: Mon, 10 May 2021 14:52:40 +1000 Subject: [PATCH] NewGroup: fix redirect --- pkg/interface/src/views/landscape/components/NewGroup.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/interface/src/views/landscape/components/NewGroup.tsx b/pkg/interface/src/views/landscape/components/NewGroup.tsx index 99c0181ae6..e3c004e54d 100644 --- a/pkg/interface/src/views/landscape/components/NewGroup.tsx +++ b/pkg/interface/src/views/landscape/components/NewGroup.tsx @@ -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: '',