Skip to content

refactor: UI#279

Open
thomas-lebeau wants to merge 4 commits into
mainfrom
dev
Open

refactor: UI#279
thomas-lebeau wants to merge 4 commits into
mainfrom
dev

Conversation

@thomas-lebeau

Copy link
Copy Markdown
Owner

No description provided.

@vercel

vercel Bot commented Mar 4, 2025

Copy link
Copy Markdown

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

Name Status Preview Updated (UTC)
100-cims ✅ Ready (Inspect) Visit Preview Mar 22, 2025 7:44am

Copilot AI left a comment

Copy link
Copy Markdown

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 refactors several UI components and integrates a ThemeProvider, Drawer, and updated layout for better styling and structure. Key changes include:

  • Introduction of a new ThemeProvider in the providers package.
  • Refactoring of the Drawer and Nav components to improve UI styling and layout.
  • Updates to the Map and Marker components to support a container for markers and integrate onClick functionality.

Reviewed Changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/components/providers/theme-provider.tsx New theme provider component for managing client-side theme state.
src/components/ui/drawer.tsx Refactored Drawer components with updated data attributes and styling classes.
src/components/nav/nav.tsx Updated navigation component with additional styling (z-index and background).
src/components/map/map.tsx Wrapped marker children with a container element for improved marker layout.
src/components/providers/index.tsx Added ThemeProvider to the Providers component.
src/app/components/main.tsx Refactored main component for UI adjustments including Drawer integration and snap points.
src/app/layout.tsx Updated layout component with hydration suppression and re-ordered Nav rendering.
src/components/map/pin.tsx Modified the Pin component to require an onClick callback.
src/components/map/marker.tsx Updated Marker component to pass onClick to the Pin component.
Files not reviewed (1)
  • package.json: Language not supported

onClick: () => void;
};

export function Pin({ className, color, ref, onClick }: PinProps) {

Copilot AI Mar 25, 2025

Copy link

Choose a reason for hiding this comment

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

Using 'ref' as a prop directly in a functional component may prevent proper ref forwarding. Consider refactoring Pin to use React.forwardRef so that refs are handled correctly.

Suggested change
export function Pin({ className, color, ref, onClick }: PinProps) {
export const Pin = React.forwardRef<SVGSVGElement, PinProps>(({ className, color, onClick }, ref) => {

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