Done
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import { usePage as useInertiaPage } from '@inertiajs/vue3';
|
||||
import type { SharedData } from '@/types/types';
|
||||
|
||||
/**
|
||||
* Typed drop-in replacement for Inertia's usePage().
|
||||
* Usage: import { usePage } from '@/composables/usePage';
|
||||
* const page = usePage();
|
||||
* page.props.auth.user?.name // fully typed
|
||||
*/
|
||||
export function usePage() {
|
||||
return useInertiaPage<SharedData>();
|
||||
}
|
||||
Reference in New Issue
Block a user