Skip to content
This repository has been archived by the owner on Mar 10, 2024. It is now read-only.

fix: sync configs list UI #1908

Merged
merged 1 commit into from
Nov 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { Button, Stack } from '@mui/material';
import type { GridColDef } from '@mui/x-data-grid';
import { DataGrid } from '@mui/x-data-grid';
import type { SyncConfigDTO } from '@supaglue/types';
import { SUPAGLUE_MANAGED_DESTINATION } from '@supaglue/utils';
import Link from 'next/link';
import { DeleteSyncConfig } from './DeleteSyncConfig';

Expand Down Expand Up @@ -56,7 +57,7 @@ export default function SyncConfigListPanel(props: SupaglueProps) {
width: 75,
sortable: false,
renderCell: (params) => {
const provider = providers.find((provider) => provider.id === params.row.provider);
const provider = providers.find((provider) => provider.name === params.row.provider);
if (!provider) {
return <i>Unknown provider</i>;
}
Expand All @@ -76,7 +77,12 @@ export default function SyncConfigListPanel(props: SupaglueProps) {
width: 150,
sortable: false,
renderCell: (params) => {
const destination = destinations.find((destination) => destination.id === params.row.destination);
const destination = destinations.find((destination) => {
if (destination.type === 'supaglue') {
return params.row.destination === SUPAGLUE_MANAGED_DESTINATION;
}
return destination.name === params.row.destination;
});
if (!destination) {
return <i>Unknown destination</i>;
}
Expand Down