Skip to content

Conversation

@webJose
Copy link
Contributor

@webJose webJose commented Oct 1, 2025

…eparate, importable function

@webJose webJose requested a review from Copilot October 1, 2025 00:34
Copy link
Contributor

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 refactors the Link component by extracting inline style calculation logic into a reusable utility function and replacing custom active route detection with a centralized isRouteActive() function.

  • Extracted style merging logic from Link component into a standalone joinStyles() utility function
  • Replaced inline active route detection with isRouteActive() function from public-utils
  • Added necessary type imports to support the new utility function

Reviewed Changes

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

File Description
src/lib/utils.ts Added joinStyles() utility function for combining CSS styles and imported required types
src/lib/Link/Link.svelte Replaced inline style calculation and active route detection with imported utility functions

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@webJose webJose merged commit 147f0a7 into main Oct 1, 2025
1 check passed
@webJose webJose deleted the JP/refactor branch October 1, 2025 00:39
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