Simplified branches while resolving server Id

This commit is contained in:
Alejandro Celaya
2021-11-06 12:04:26 +01:00
parent a6892b8a12
commit 0bb5c7d8af
3 changed files with 7 additions and 6 deletions

View File

@@ -11,7 +11,7 @@ import { CreateShortUrlProps } from '../short-urls/CreateShortUrl';
import { VisitsOverview } from '../visits/reducers/visitsOverview';
import { Versions } from '../utils/helpers/version';
import { Topics } from '../mercure/helpers/Topics';
import { isServerWithId, SelectedServer } from './data';
import { getServerId, SelectedServer } from './data';
import './Overview.scss';
interface OverviewConnectProps {
@@ -40,7 +40,7 @@ export const Overview = (
const { loading, shortUrls } = shortUrlsList;
const { loading: loadingTags } = tagsList;
const { loading: loadingVisits, visitsCount, orphanVisitsCount } = visitsOverview;
const serverId = isServerWithId(selectedServer) ? selectedServer.id : '';
const serverId = getServerId(selectedServer);
const history = useHistory();
useEffect(() => {