Reduced duplication when defining routes in visits section

This commit is contained in:
Alejandro Celaya
2020-12-20 19:42:37 +01:00
parent 83221c1066
commit 4642e07fd3
2 changed files with 12 additions and 14 deletions

View File

@@ -28,7 +28,6 @@ const ShortUrlVisits = boundToMercureHub(({
}: ShortUrlVisitsProps) => {
const { shortCode } = params;
const { domain } = parseQuery<{ domain?: string }>(search);
const loadVisits = (params: Partial<ShlinkVisitsParams>) => getShortUrlVisits(shortCode, { ...params, domain });
useEffect(() => {