mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2024-12-28 03:48:23 +03:00
8 lines
245 B
TypeScript
8 lines
245 B
TypeScript
|
import { createContext, useContext } from 'react';
|
||
|
|
||
|
const RoutesPrefixContext = createContext('');
|
||
|
|
||
|
export const RoutesPrefixProvider = RoutesPrefixContext.Provider;
|
||
|
|
||
|
export const useRoutesPrefix = (): string => useContext(RoutesPrefixContext);
|