mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-07-20 18:51:53 +00:00
Created new Result component to display operation result messages consistently
This commit is contained in:
@@ -11,6 +11,7 @@ import Message from '../utils/Message';
|
||||
import { formatIsoDate } from '../utils/helpers/date';
|
||||
import { ShlinkVisitsParams } from '../utils/services/types';
|
||||
import { DateInterval, DateRange, intervalToDateRange } from '../utils/dates/types';
|
||||
import { Result } from '../utils/Result';
|
||||
import SortableBarGraph from './helpers/SortableBarGraph';
|
||||
import GraphCard from './helpers/GraphCard';
|
||||
import LineChartCard from './helpers/LineChartCard';
|
||||
@@ -130,11 +131,7 @@ const VisitsStats: FC<VisitsStatsProps> = ({ children, visitsInfo, getVisits, ca
|
||||
}
|
||||
|
||||
if (error) {
|
||||
return (
|
||||
<Card body inverse color="danger">
|
||||
An error occurred while loading visits :(
|
||||
</Card>
|
||||
);
|
||||
return <Result type="error">An error occurred while loading visits :(</Result>;
|
||||
}
|
||||
|
||||
if (isEmpty(visits)) {
|
||||
|
||||
Reference in New Issue
Block a user