File tree Expand file tree Collapse file tree 2 files changed +2
-9
lines changed
packages/web/src/app/[domain]/connections
components/connectionList Expand file tree Collapse file tree 2 files changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -33,10 +33,7 @@ export const Overview = ({ connectionId }: OverviewProps) => {
33
33
34
34
const { data : connection , isLoading } = useQuery ( {
35
35
queryKey : [ 'connection' , domain , connectionId ] ,
36
- queryFn : async ( ) => {
37
- const connection = await getConnectionInfo ( connectionId , domain ) ;
38
- return connection ;
39
- } ,
36
+ queryFn : ( ) => getConnectionInfo ( connectionId , domain ) ,
40
37
refetchInterval : NEXT_PUBLIC_POLLING_INTERVAL_MS ,
41
38
} ) ;
42
39
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ export const ConnectionList = ({
40
40
const [ searchQuery , setSearchQuery ] = useState ( "" ) ;
41
41
const [ selectedStatuses , setSelectedStatuses ] = useState < string [ ] > ( [ ] ) ;
42
42
43
- const { data : unfilteredConnections , isLoading, error } = useQuery ( {
43
+ const { data : unfilteredConnections , isLoading } = useQuery ( {
44
44
queryKey : [ 'connections' , domain ] ,
45
45
queryFn : ( ) => getConnections ( domain ) ,
46
46
refetchInterval : NEXT_PUBLIC_POLLING_INTERVAL_MS ,
@@ -114,10 +114,6 @@ export const ConnectionList = ({
114
114
</ div >
115
115
) ) }
116
116
</ 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 >
121
117
) : connections && connections . length > 0 ? (
122
118
connections
123
119
. sort ( ( a , b ) => b . updatedAt . getTime ( ) - a . updatedAt . getTime ( ) )
You can’t perform that action at this time.
0 commit comments