Skip to content

Conversation

@mt-shihab26
Copy link

I am working on my project. I saw on the settings layout navigation links that plain URL paths are used. I was converting those linked into route names on my project. I thought it would be a good contribution to this stater kit.

Now, in the settings layout navigation links route() function is being used with route names.

Also using route().current() function instead of window.location.pathname to determine the active state.

@tnylea
Copy link
Contributor

tnylea commented Mar 19, 2025

Looks great! Thanks @p-nerd, would you mind moving the SettingsSidebarNavItem interface to the types/index.d.ts file: https://github.com/laravel/react-starter-kit/blob/main/resources/js/types/index.d.ts.

Thanks!

@tnylea tnylea added the Awaiting User Response Waiting for developers response label Mar 19, 2025
@mt-shihab26
Copy link
Author

mt-shihab26 commented Mar 19, 2025

Done @tnylea, Just moved the type into @/types/index.d.ts

@tnylea
Copy link
Contributor

tnylea commented Mar 31, 2025

Thanks @p-nerd. Looks great.

We may have a conflict in this PR here: https://github.com/laravel/react-starter-kit/pull/86/files that we'll need to include in this update, but we can get that resolved quickly. Appreciate it.

@tnylea tnylea added Approved Approved for Merge and removed Awaiting User Response Waiting for developers response labels Mar 31, 2025
@taylorotwell
Copy link
Member

Could the interface stay the same but just pass the href using a ziggy resolved string?

@mt-shihab26
Copy link
Author

But you use put route name on the array then we can use route().current() function to determine active state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Approved Approved for Merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants