mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-06-01 10:06:17 +00:00
#325 Updated to react 17
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import React, { FC } from 'react';
|
||||
import { FC } from 'react';
|
||||
import { versionMatch, Versions } from '../../utils/helpers/version';
|
||||
import { isReachableServer, SelectedServer } from '../data';
|
||||
|
||||
@@ -18,7 +18,7 @@ const ForServerVersion: FC<ForServerVersionProps> = ({ minVersion, maxVersion, s
|
||||
return null;
|
||||
}
|
||||
|
||||
return <React.Fragment>{children}</React.Fragment>;
|
||||
return <>{children}</>;
|
||||
};
|
||||
|
||||
export default ForServerVersion;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { useRef, RefObject, ChangeEvent, MutableRefObject } from 'react';
|
||||
import { useRef, RefObject, ChangeEvent, MutableRefObject } from 'react';
|
||||
import { UncontrolledTooltip } from 'reactstrap';
|
||||
import ServersImporter from '../services/ServersImporter';
|
||||
import { ServerData } from '../data';
|
||||
@@ -33,7 +33,7 @@ const ImportServersBtn = ({ importServersFromFile }: ServersImporter) => ({
|
||||
.catch(onImportError);
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
<>
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-outline-secondary mr-2"
|
||||
@@ -47,7 +47,7 @@ const ImportServersBtn = ({ importServersFromFile }: ServersImporter) => ({
|
||||
</UncontrolledTooltip>
|
||||
|
||||
<input type="file" accept="text/csv" className="create-server__csv-select" ref={ref} onChange={onChange} />
|
||||
</React.Fragment>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { FC } from 'react';
|
||||
import { FC } from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import Message from '../../utils/Message';
|
||||
import ServersListGroup from '../ServersListGroup';
|
||||
@@ -19,10 +19,10 @@ export const ServerError = (DeleteServerButton: FC<DeleteServerButtonProps>): FC
|
||||
<Message type="error">
|
||||
{!isServerWithId(selectedServer) && 'Could not find this Shlink server.'}
|
||||
{isServerWithId(selectedServer) && (
|
||||
<React.Fragment>
|
||||
<>
|
||||
<p>Oops! Could not connect to this Shlink server.</p>
|
||||
Make sure you have internet connection, and the server is properly configured and on-line.
|
||||
</React.Fragment>
|
||||
</>
|
||||
)}
|
||||
</Message>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { FC, useEffect, useState } from 'react';
|
||||
import { FC, useEffect, useState } from 'react';
|
||||
import { HorizontalFormGroup } from '../../utils/HorizontalFormGroup';
|
||||
import { handleEventPreventingDefault } from '../../utils/utils';
|
||||
import { ServerData } from '../data';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { FC, useEffect } from 'react';
|
||||
import { FC, useEffect } from 'react';
|
||||
import { RouteComponentProps } from 'react-router';
|
||||
import Message from '../../utils/Message';
|
||||
import { isNotFoundServer, SelectedServer } from '../data';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { FC, useEffect } from 'react';
|
||||
import { FC, useEffect } from 'react';
|
||||
|
||||
interface WithoutSelectedServerProps {
|
||||
resetSelectedServer: Function;
|
||||
|
||||
Reference in New Issue
Block a user