Skip to content

Commit

Permalink
Merge pull request #251 from wyeworks/bl/hotfix/refresh
Browse files Browse the repository at this point in the history
fix: refresh group on mobile
  • Loading branch information
Frodo2412 authored Nov 10, 2023
2 parents 3df1698 + 13f4bd5 commit 4cc7759
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions client/src/app/(protected)/groups/[id]/GroupDisclosure.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@ import sections from './Sections';

type GroupDisclosureProps = {
group: StudyGroup;
fetchGroup?: () => void;
};

export default function GroupDisclosure({ group }: GroupDisclosureProps) {
export default function GroupDisclosure({
group,
fetchGroup,
}: GroupDisclosureProps) {
return (
<div>
{sections.map((section) => (
Expand All @@ -29,7 +33,7 @@ export default function GroupDisclosure({ group }: GroupDisclosureProps) {
/>
</Disclosure.Button>
<Disclosure.Panel className='px-4 pb-2 pt-4 text-sm'>
{section.content(group)}
{section.content(group, fetchGroup)}
</Disclosure.Panel>
</>
)}
Expand Down
2 changes: 1 addition & 1 deletion client/src/app/(protected)/groups/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export default function Group({ params }: Props) {
<div className='flex-shrink-0 flex-grow'>
{/* Displayed only on mobile */}
<div className='md:hidden'>
<GroupDisclosure group={group} />
<GroupDisclosure group={group} fetchGroup={fetchGroup} />
</div>

{/* Displayed from medium screens and up */}
Expand Down

0 comments on commit 4cc7759

Please sign in to comment.