Last active
September 20, 2021 21:04
-
-
Save ortzinator/ceec18e42c4b88d3b7cb6cf4cb8d7fd1 to your computer and use it in GitHub Desktop.
Inertia reactive navigation
This file contains 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
const navigation = ref([ | |
{ | |
name: 'Dashboard', | |
get href() { | |
return route('dashboard'); | |
}, | |
get current() { | |
return route().current('dashboard'); | |
} | |
}, | |
{ | |
name: 'Policies', | |
get href() { | |
return route('policies'); | |
}, | |
get current() { | |
return route().current('policies'); | |
} | |
}, | |
{ | |
name: 'Contacts', | |
get href() { | |
return route('contacts'); | |
}, | |
get current() { | |
return route().current('contacts'); | |
} | |
} | |
]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment