Skip to content

Commit 316c784

Browse files
further wip
1 parent 85f3f34 commit 316c784

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

packages/web/src/app/[domain]/connections/[id]/components/overview.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,7 @@ export const Overview = ({ connectionId }: OverviewProps) => {
3333

3434
const { data: connection, isLoading } = useQuery({
3535
queryKey: ['connection', domain, connectionId],
36-
queryFn: async () => {
37-
const connection = await getConnectionInfo(connectionId, domain);
38-
return connection;
39-
},
36+
queryFn: () => getConnectionInfo(connectionId, domain),
4037
refetchInterval: NEXT_PUBLIC_POLLING_INTERVAL_MS,
4138
});
4239

packages/web/src/app/[domain]/connections/components/connectionList/index.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export const ConnectionList = ({
4040
const [searchQuery, setSearchQuery] = useState("");
4141
const [selectedStatuses, setSelectedStatuses] = useState<string[]>([]);
4242

43-
const { data: unfilteredConnections, isLoading, error } = useQuery({
43+
const { data: unfilteredConnections, isLoading } = useQuery({
4444
queryKey: ['connections', domain],
4545
queryFn: () => getConnections(domain),
4646
refetchInterval: NEXT_PUBLIC_POLLING_INTERVAL_MS,
@@ -114,10 +114,6 @@ export const ConnectionList = ({
114114
</div>
115115
))}
116116
</div>
117-
) : error ? (
118-
<div className="flex flex-col items-center justify-center border rounded-md p-4 h-full">
119-
<p>Error loading connections: {error instanceof Error ? error.message : 'An unknown error occurred'}</p>
120-
</div>
121117
) : connections && connections.length > 0 ? (
122118
connections
123119
.sort((a, b) => b.updatedAt.getTime() - a.updatedAt.getTime())

0 commit comments

Comments
 (0)