shlink-web-client/shlink-web-component/utils/routesPrefix.ts
2023-08-03 09:13:10 +02:00

7 lines
245 B
TypeScript

import { createContext, useContext } from 'react';
const RoutesPrefixContext = createContext('');
export const RoutesPrefixProvider = RoutesPrefixContext.Provider;
export const useRoutesPrefix = (): string => useContext(RoutesPrefixContext);