refactor: UI#279
Open
thomas-lebeau wants to merge 4 commits into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.