mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-16 20:43:48 +00:00
Extract shlink-web-component outside of src folder
This commit is contained in:
7
shlink-web-component/utils/routesPrefix.ts
Normal file
7
shlink-web-component/utils/routesPrefix.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { createContext, useContext } from 'react';
|
||||
|
||||
const RoutesPrefixContext = createContext('');
|
||||
|
||||
export const RoutesPrefixProvider = RoutesPrefixContext.Provider;
|
||||
|
||||
export const useRoutesPrefix = (): string => useContext(RoutesPrefixContext);
|
||||
Reference in New Issue
Block a user