Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
pankaj-peerdb committed Dec 18, 2023
1 parent b168f59 commit 101305a
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions ui/app/mirrors/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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';
Expand Down

0 comments on commit 101305a

Please sign in to comment.