Skip to content

fix: improve usability and ensure type safety #97

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

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

Conversation

firebed
Copy link

@firebed firebed commented Apr 8, 2025

  • Removed initializeTheme from useAppearance because it is already called in app.ts
  • Changed type for method property from string to inertia's Method type ('get' | 'post' | 'put' | 'patch' | 'delete') for better type safety.
  • Fixed a bug in AppSidebarHeader. When the property breadcrumbs doesn't exist we get runtime error
    image

firebed added 3 commits April 8, 2025 13:57
initializeTheme is already called in app.ts
Replaced the generic string type with the Method type from @inertiajs/core for better type safety and alignment with Inertia.js.
Ensure the sidebar only renders breadcrumbs when the `breadcrumbs` object exists and has entries. This prevents potential runtime errors if `breadcrumbs` is null or undefined.
@firebed firebed changed the title fix(appearance): Remove duplicate initializeTheme call fix: improve usability and ensure type safety Apr 8, 2025
@tnylea
Copy link
Contributor

tnylea commented Apr 14, 2025

Thanks, @firebed, These all look good 👍

@tnylea tnylea added the Approved Approved for merge label Apr 14, 2025
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.

2 participants