Skip to content

Conversation

@lachlanjc
Copy link
Owner

No description provided.

@lachlanjc lachlanjc requested a review from Copilot April 17, 2025 02:56
@vercel
Copy link

vercel bot commented Apr 17, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
superfund-map ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 17, 2025 2:59am

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a video section to the site by fetching videos from an external API and rendering them using social media embeds and a fallback to YouTube embeds. Key changes include:

  • Creating a new API call (fetchVideos) and a corresponding Videos component to fetch and display videos.
  • Introducing a VideosClient component that renders embeds for Facebook, TikTok, Instagram, and YouTube.
  • Updating the page and SiteCard components to include the new Videos section within Suspense wrappers for improved user experience.

Reviewed Changes

Copilot reviewed 6 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
app/(map)/sites/[site]/videos.tsx Adds API fetch function and Videos component integration.
app/(map)/sites/[site]/videos.client.tsx Implements video rendering using various social media embeds.
app/(map)/sites/[site]/site.tsx Adjusts SiteCard layout to include the new videos and updates styling.
app/(map)/sites/[site]/page.tsx Wraps the new Videos component in Suspense alongside Nearby.
app/(map)/sites/[site]/nearby.tsx Minor styling adjustment by removing a top margin.
Files not reviewed (2)
  • app/globals.css: Language not supported
  • package.json: Language not supported

if (!videos || videos.length === 0) return null;
return (
<VideosClient
videos={videos.sort((a, b) => b.link.localeCompare(a.link))}
Copy link

Copilot AI Apr 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider sorting videos based on a more meaningful attribute (e.g., publication date or title) rather than using the video link, unless the link-based sorting is intentional. Adding a comment to clarify the reasoning may help future maintainers.

Suggested change
videos={videos.sort((a, b) => b.link.localeCompare(a.link))}
videos={videos.sort((a, b) => new Date(b.publishedDate).getTime() - new Date(a.publishedDate).getTime())}

Copilot uses AI. Check for mistakes.
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.

2 participants