shlink-web-client/shlink-web-component/utils/routesPrefix.ts

8 lines
245 B
TypeScript
Raw Normal View History

2023-07-24 18:30:58 +03:00
import { createContext, useContext } from 'react';
const RoutesPrefixContext = createContext('');
export const RoutesPrefixProvider = RoutesPrefixContext.Provider;
export const useRoutesPrefix = (): string => useContext(RoutesPrefixContext);