Skip to content

Commit

Permalink
Removed button to show more events when there are no more events to s…
Browse files Browse the repository at this point in the history
…how on frontpage
  • Loading branch information
Magnus Brecke committed Feb 27, 2024
1 parent 0d01ead commit 14ab234
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion app/components/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,12 @@ const AccountDropdownItems = ({ onClose }: AccountDropdownItemsProps) => {
);
};


const UpcomingMeetingButton = () => {

const upcomingMeetingId = useAppSelector(selectUpcomingMeetingId);
const navigate = useNavigate();

const pagination = useAppSelector((state) => state.meetings.pagination);
const queryString = createQueryString({
date_after: moment().format('YYYY-MM-DD'),
Expand All @@ -105,6 +107,7 @@ const UpcomingMeetingButton = () => {
),
[endpoint]
);


if (!upcomingMeetingId) return;

Expand Down
2 changes: 1 addition & 1 deletion app/routes/overview/components/Overview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ const Overview = () => {
<Articles articles={articlesShown} />
</section>

{frontpage.length > 8 && (
{frontpage.length > 8 && events.length > eventsToShow && (
<div className={styles.showMore}>
<Icon onClick={showMore} name="chevron-down-outline" size={30} />
</div>
Expand Down

0 comments on commit 14ab234

Please sign in to comment.