mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-17 21:13:48 +00:00
Migrated tags helpers to TS
This commit is contained in:
@@ -4,6 +4,7 @@ import { ExternalLink } from 'react-external-link';
|
||||
import { ShortUrlTags } from '../reducers/shortUrlTags';
|
||||
import { ShortUrlModalProps } from '../data';
|
||||
import { OptionalString } from '../../utils/utils';
|
||||
import { TagsSelectorProps } from '../../tags/helpers/TagsSelector';
|
||||
|
||||
interface EditTagsModalProps extends ShortUrlModalProps {
|
||||
shortUrlTags: ShortUrlTags;
|
||||
@@ -11,7 +12,7 @@ interface EditTagsModalProps extends ShortUrlModalProps {
|
||||
resetShortUrlsTags: () => void;
|
||||
}
|
||||
|
||||
const EditTagsModal = (TagsSelector: FC<any>) => ( // TODO Use TagsSelector type when available
|
||||
const EditTagsModal = (TagsSelector: FC<TagsSelectorProps>) => (
|
||||
{ isOpen, toggle, shortUrl, shortUrlTags, editShortUrlTags, resetShortUrlsTags }: EditTagsModalProps,
|
||||
) => {
|
||||
const [ selectedTags, setSelectedTags ] = useState<string[]>(shortUrl.tags || []);
|
||||
|
||||
Reference in New Issue
Block a user