Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

+ cleanRoute in PageOptions #621

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

+ cleanRoute in PageOptions #621

wants to merge 2 commits into from

Conversation

yracnet
Copy link

@yracnet yracnet commented Dec 6, 2024

Description

The cleanRoute function is designed to process and clean routes by removing unnecessary parts of the URL or route string.

Additional context

In Remix, we can declare a layout with the same name as the directory. However, with cleanRoute, we can add a .layout suffix to the layout page, making it easier to differentiate between the layout and other pages in the same directory.


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

@hannoeru
Copy link
Owner

hannoeru commented Dec 9, 2024

How about using existing extendRoute feature?

@yracnet
Copy link
Author

yracnet commented Dec 9, 2024

This change simplifies the process by applying logic directly to the group of pages, avoiding unnecessary global conditional logic and keeping the configuration cleaner and direct

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