From ba9cfd8e92b71b5073eeafbe884b32b0673a3dd4 Mon Sep 17 00:00:00 2001 From: Liam Fitzgerald Date: Tue, 7 Dec 2021 11:04:36 -0500 Subject: [PATCH] interface: do not redirect to joined group automatically --- pkg/interface/src/views/apps/launch/App.tsx | 6 ++-- .../views/landscape/components/Join/Join.tsx | 30 ++++++++++++++----- .../landscape/components/Join/Skeleton.tsx | 7 ++++- 3 files changed, 30 insertions(+), 13 deletions(-) diff --git a/pkg/interface/src/views/apps/launch/App.tsx b/pkg/interface/src/views/apps/launch/App.tsx index 9df5c30dfa..773fa14b99 100644 --- a/pkg/interface/src/views/apps/launch/App.tsx +++ b/pkg/interface/src/views/apps/launch/App.tsx @@ -83,7 +83,7 @@ export const LaunchApp = (props: LaunchAppProps): ReactElement | null => { { - + + diff --git a/pkg/interface/src/views/landscape/components/Join/Skeleton.tsx b/pkg/interface/src/views/landscape/components/Join/Skeleton.tsx index 688e3c6cc5..07bb1a84cb 100644 --- a/pkg/interface/src/views/landscape/components/Join/Skeleton.tsx +++ b/pkg/interface/src/views/landscape/components/Join/Skeleton.tsx @@ -17,6 +17,7 @@ import { resourceFromPath } from "~/logic/lib/group"; import useMetadataState, { usePreview } from "~/logic/state/metadata"; import useInviteState, { useInviteForResource } from "~/logic/state/invite"; +import {useHistory} from "react-router-dom"; const SUMMARY_HEIGHT = "96px"; @@ -38,6 +39,10 @@ interface JoinSkeletonProps { export function JoinSkeleton(props: JoinSkeletonProps) { const { title, body, children, onJoin, desc, modal } = props; + const history = useHistory(); + const dismiss = () => { + history.push({ search: '' }); + }; const inner = ( ); return modal ? ( - {}}>{inner} + {inner} ) : ( inner );