Skip to content

Conversation

@nejidevelops
Copy link
Member

Description

This PR fixes the slice error in the Upcoming Events section and improves the empty state UI.

Closes #264


Changes Made

  • Added safe check with Array.isArray(topEvents?.results) before calling .slice().
  • Updated empty state to use a Lucide CalendarX icon with a descriptive message.
  • Removed dependency on animations for empty states, simplifying the component.
  • Ensured styling consistency with Tailwind and design system.

Before:

  • App crashed when results was undefined.
  • Empty state unclear and inconsistent.

After:

  • No runtime error when API returns no results.
  • Clear empty state with icon and message.

How to Test

  1. Run the app locally.
  2. Navigate to the landing page where OurEvents is rendered.
  3. Confirm that:
    • When events are available, the first 6 display correctly.
    • When no events are returned, a clear empty state appears (icon + text).
    • No console errors are thrown.

Checklist

  • Tested locally without errors
  • Code follows project conventions
  • UI is consistent with the design system
  • Issue reference included (Closes #264 )

Additional Notes

This fix improves both stability (no crashes when data is missing) and user experience (clear empty state).


@netlify
Copy link

netlify bot commented Oct 23, 2025

👷 Deploy request for syt-dev pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 1864517

@netlify
Copy link

netlify bot commented Oct 23, 2025

Deploy Preview for spaceyatech ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 1864517
🔍 Latest deploy log https://app.netlify.com/projects/spaceyatech/deploys/68fa8b3d9730d2000848ac5a
😎 Deploy Preview https://deploy-preview-265--spaceyatech.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 60
Accessibility: 98
Best Practices: 92
SEO: 100
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 Fix slice() error on undefined events data and improve empty state UI

1 participant