@tempots/ui
setLocationFromUrl() function
Sets the location from the given URL and updates the specified property.
Signature:
setLocationFromUrl: (prop: Prop<LocationData>, url: string) => Prop<LocationData>
Parameters
Parameter |
Type |
Description |
---|---|---|
prop |
Prop<LocationData> |
The property to update with the new location. |
url |
string |
The URL from which to extract the location. |
Returns: Prop<LocationData>
The updated property.