Skip to content

Commit

Permalink
Merge pull request #38 from j-h-scheufen/endspurt-mvp
Browse files Browse the repository at this point in the history
Fixed missing CreateGroupAssociation on Profile
  • Loading branch information
j-h-scheufen authored Oct 21, 2024
2 parents 402eb55 + 4ad0375 commit b53a19d
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,14 @@ import { useAtomValue } from 'jotai';

import GroupCard from '@/components/GroupCard';
import { currentUserGroupAtom } from '@/hooks/state/currentUser';
import CreateGroupAssociation from '../CreateGroupAssociation';

const ProfileGroupAssociation = () => {
const { data: group, isFetching } = useAtomValue(currentUserGroupAtom);

if (isFetching) return <Spinner />;

return group ? (
<GroupCard group={group} />
) : (
<div className="text-default-500 text-sm">You are currently not associated with a group</div>
);
return group ? <GroupCard group={group} /> : <CreateGroupAssociation />;
};

export default ProfileGroupAssociation;

0 comments on commit b53a19d

Please sign in to comment.