CloudTwin  ROS2 Humble
Digital twin for path and trajectory optimisation
Variables
use-current-url.ts File Reference

Variables

 import { usePage } from '@inertiajs/react'
 
export type IsCurrentOrParentUrlFn
 
export type IsCurrentUrlFn
 
import type { InertiaLinkProps } from '@inertiajs/react'
 
export type UseCurrentUrlReturn
 
export type WhenCurrentUrlFn
 

Variable Documentation

◆ import

import { usePage } from '@inertiajs/react'

◆ IsCurrentOrParentUrlFn

export type IsCurrentOrParentUrlFn
Initial value:
= (
urlToCheck: NonNullable<InertiaLinkProps['href']>,
currentUrl?: string,
) => boolean

◆ IsCurrentUrlFn

export type IsCurrentUrlFn
Initial value:
= (
urlToCheck: NonNullable<InertiaLinkProps['href']>,
currentUrl?: string,
startsWith?: boolean,
) => boolean

◆ type

import type { InertiaLinkProps } from '@inertiajs/react'

◆ UseCurrentUrlReturn

export type UseCurrentUrlReturn
Initial value:
= {
currentUrl: string;
isCurrentUrl: IsCurrentUrlFn;
isCurrentOrParentUrl: IsCurrentOrParentUrlFn;
whenCurrentUrl: WhenCurrentUrlFn;
}
export type WhenCurrentUrlFn
Definition: use-current-url.ts:16
export type IsCurrentUrlFn
Definition: use-current-url.ts:5
export type IsCurrentOrParentUrlFn
Definition: use-current-url.ts:11

◆ WhenCurrentUrlFn

export type WhenCurrentUrlFn
Initial value:
= <TIfTrue, TIfFalse = null>(
urlToCheck: NonNullable<InertiaLinkProps['href']>,
ifTrue: TIfTrue,
ifFalse?: TIfFalse,
) => TIfTrue | TIfFalse