Skip to content

Commit ead0b92

Browse files
committed
chore: run lint and prettier
1 parent 7773ef8 commit ead0b92

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed
Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
import { usePage } from '@inertiajs/vue3';
21
import type { InertiaLinkProps } from '@inertiajs/vue3';
2+
import { usePage } from '@inertiajs/vue3';
33
import { computed, readonly } from 'vue';
44

5-
const page = usePage()
6-
const currentUrlReactive = computed(()=> new URL(page.url, window?.location.origin).pathname);
5+
const page = usePage();
6+
const currentUrlReactive = computed(
7+
() => new URL(page.url, window?.location.origin).pathname,
8+
);
79

810
function toUrl(href: NonNullable<InertiaLinkProps['href']>) {
911
return typeof href === 'string' ? href : href?.url;
1012
}
1113

12-
export function useActiveUrl(){
13-
function urlIsActive(
14+
export function useActiveUrl() {
15+
function urlIsActive(
1416
urlToCheck: NonNullable<InertiaLinkProps['href']>,
1517
currentUrl?: string,
1618
) {
@@ -21,6 +23,6 @@ export function useActiveUrl(){
2123
return {
2224
currentUrl: readonly(currentUrlReactive),
2325
urlIsActive,
24-
toUrl
25-
}
26-
}
26+
toUrl,
27+
};
28+
}

0 commit comments

Comments
 (0)