mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-10 09:33:51 +00:00
Fixed reference error
This commit is contained in:
@@ -2,6 +2,7 @@ import { useState, useRef, EffectCallback, DependencyList, useEffect } from 'rea
|
||||
import { useSwipeable as useReactSwipeable } from 'react-swipeable';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { parseQuery, stringifyQuery } from './query';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
|
||||
const DEFAULT_DELAY = 2000;
|
||||
|
||||
@@ -82,3 +83,8 @@ export const useGoBack = () => {
|
||||
|
||||
return () => navigate(-1);
|
||||
};
|
||||
|
||||
export const useDomId = (): string => {
|
||||
const { current: id } = useRef(`dom-${uuid()}`);
|
||||
return id;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user