From 101305a7230345e37be19465f4caf34b8cd6458f Mon Sep 17 00:00:00 2001 From: Pankaj B Date: Mon, 18 Dec 2023 22:15:35 +0530 Subject: [PATCH] cleanup --- ui/app/mirrors/page.tsx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/ui/app/mirrors/page.tsx b/ui/app/mirrors/page.tsx index b3e53cbceb..e4cb5318a6 100644 --- a/ui/app/mirrors/page.tsx +++ b/ui/app/mirrors/page.tsx @@ -23,13 +23,20 @@ const stringifyConfig = (flowArray: any[]) => { }; export default function Mirrors() { - const { data: flows, error, isLoading } = useSWR('/api/mirrors', fetcher); + const { + data: flows, + error, + isLoading, + }: { data: [any]; error: any; isLoading: boolean } = useSWR( + '/api/mirrors', + fetcher + ); - let cdcFlows = flows?.filter((flow: any) => { + let cdcFlows = flows?.filter((flow) => { return !flow.query_string; }); - let qrepFlows = flows?.filter((flow: any) => { + let qrepFlows = flows?.filter((flow) => { if (flow.config_proto && flow.query_string) { let config = QRepConfig.decode(flow.config_proto); const watermarkCol = config.watermarkColumn.toLowerCase(); @@ -38,7 +45,7 @@ export default function Mirrors() { return false; }); - let xminFlows = flows?.filter((flow: any) => { + let xminFlows = flows?.filter((flow) => { if (flow.config_proto && flow.query_string) { let config = QRepConfig.decode(flow.config_proto); return config.watermarkColumn.toLowerCase() === 'xmin';