Farmbot-Web-App/frontend/history.tsx
2019-01-30 08:00:26 -06:00

12 lines
381 B
TypeScript

import { navigate } from "takeme";
import { maybeStripLegacyUrl } from "./link";
export const push = (url: string) => navigate(maybeStripLegacyUrl(url));
export function getPathArray() {
return location.pathname.split("/");
}
/** This is a stub from the `react-router` days. Don't use it anymore. */
export const history = { push, getCurrentLocation: () => window.location };