Move more components to shlink-web-component when applicable

This commit is contained in:
Alejandro Celaya
2023-07-29 10:43:15 +02:00
parent 275745fd3a
commit 8d24116859
94 changed files with 224 additions and 209 deletions

View File

@@ -3,7 +3,6 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import type { FC } from 'react';
import { useEffect } from 'react';
import { UncontrolledTooltip } from 'reactstrap';
import type { OptionalString } from '../../src/utils/utils';
import type { ShlinkDomainRedirects } from '../api-contract';
import type { Domain } from './data';
import { DomainDropdown } from './helpers/DomainDropdown';
@@ -17,7 +16,7 @@ interface DomainRowProps {
checkDomainHealth: (domain: string) => void;
}
const Nr: FC<{ fallback: OptionalString }> = ({ fallback }) => (
const Nr: FC<{ fallback?: string | null }> = ({ fallback }) => (
<span className="text-muted">
{!fallback && <small>No redirect</small>}
{fallback && <>{fallback} <small>(as fallback)</small></>}

View File

@@ -1,10 +1,10 @@
import type { FC } from 'react';
import { useEffect } from 'react';
import { ShlinkApiError } from '../../src/api/ShlinkApiError';
import { Message } from '../../src/utils/Message';
import { Result } from '../../src/utils/Result';
import { SearchField } from '../../src/utils/SearchField';
import { SimpleCard } from '../../src/utils/SimpleCard';
import { ShlinkApiError } from '../common/ShlinkApiError';
import { DomainRow } from './DomainRow';
import type { EditDomainRedirects } from './reducers/domainRedirects';
import type { DomainsList } from './reducers/domainsList';

View File

@@ -8,8 +8,8 @@ import type { FC } from 'react';
import { useEffect, useState } from 'react';
import { ExternalLink } from 'react-external-link';
import { UncontrolledTooltip } from 'reactstrap';
import { useElementRef } from '../../../src/utils/helpers/hooks';
import type { MediaMatcher } from '../../../src/utils/types';
import { useElementRef } from '../../utils/helpers/hooks';
import type { MediaMatcher } from '../../utils/types';
import type { DomainStatus } from '../data';
interface DomainStatusIconProps {

View File

@@ -1,11 +1,11 @@
import type { FC } from 'react';
import { useState } from 'react';
import { Button, Modal, ModalBody, ModalFooter, ModalHeader } from 'reactstrap';
import type { ShlinkDomain } from '../../../api/types';
import type { InputFormGroupProps } from '../../../src/utils/forms/InputFormGroup';
import { InputFormGroup } from '../../../src/utils/forms/InputFormGroup';
import { InfoTooltip } from '../../../src/utils/InfoTooltip';
import { handleEventPreventingDefault, nonEmptyValueOrNull } from '../../../src/utils/utils';
import type { ShlinkDomain } from '../../api-contract';
import { InfoTooltip } from '../../utils/components/InfoTooltip';
import { handleEventPreventingDefault, nonEmptyValueOrNull } from '../../utils/helpers';
import type { EditDomainRedirects } from '../reducers/domainRedirects';
interface EditDomainRedirectsModalProps {