GroupLookup: improve column loading

This commit is contained in:
Alex Gleason 2023-04-17 15:45:16 -04:00
parent f2d5b2eaef
commit dea9979b39
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 9 additions and 1 deletions

View File

@ -3,6 +3,8 @@ import React from 'react';
import ColumnLoading from 'soapbox/features/ui/components/column-loading';
import { useGroupLookup } from 'soapbox/hooks/api/groups/useGroupLookup';
import { Layout } from '../ui';
interface IGroupLookup {
params: {
groupSlug: string
@ -21,7 +23,13 @@ function GroupLookupHoc(Component: React.ComponentType<{ params: { groupId: stri
const { entity: group } = useGroupLookup(props.params.groupSlug);
if (!group) return (
<>
<Layout.Main>
<ColumnLoading />
</Layout.Main>
<Layout.Aside />
</>
);
const newProps = {