mirror of
https://github.com/henrywhitaker3/Speedtest-Tracker.git
synced 2025-12-25 06:49:15 +01:00
11 lines
318 B
JavaScript
Vendored
11 lines
318 B
JavaScript
Vendored
import { createLocation } from "history";
|
|
|
|
export const resolveToLocation = (to, currentLocation) =>
|
|
typeof to === "function" ? to(currentLocation) : to;
|
|
|
|
export const normalizeToLocation = (to, currentLocation) => {
|
|
return typeof to === "string"
|
|
? createLocation(to, null, null, currentLocation)
|
|
: to;
|
|
};
|