@@ -13,13 +13,13 @@ import {trackAnalytics} from 'sentry/utils/analytics';
13
13
import { LogsAnalyticsPageSource } from 'sentry/utils/analytics/logsAnalyticsEvent' ;
14
14
import useOrganization from 'sentry/utils/useOrganization' ;
15
15
import { TableBody } from 'sentry/views/explore/components/table' ;
16
+ import { useLogsPageData } from 'sentry/views/explore/contexts/logs/logsPageData' ;
16
17
import {
17
18
LogsPageParamsProvider ,
18
19
useLogsSearch ,
19
20
} from 'sentry/views/explore/contexts/logs/logsPageParams' ;
20
21
import { TraceItemAttributeProvider } from 'sentry/views/explore/contexts/traceItemAttributeContext' ;
21
- import { LogRowContent } from 'sentry/views/explore/logs/logsTableRow' ;
22
- import { useExploreLogsTable } from 'sentry/views/explore/logs/useLogsQuery' ;
22
+ import { LogRowContent } from 'sentry/views/explore/logs/tables/logsTableRow' ;
23
23
import { TraceItemDataset } from 'sentry/views/explore/types' ;
24
24
import { SectionKey } from 'sentry/views/issueDetails/streamline/context' ;
25
25
import { InterimSection } from 'sentry/views/issueDetails/streamline/interimSection' ;
@@ -56,7 +56,7 @@ function OurlogsSectionContent({
56
56
} ) {
57
57
const organization = useOrganization ( ) ;
58
58
const feature = organization . features . includes ( 'ourlogs-enabled' ) ;
59
- const tableData = useExploreLogsTable ( { enabled : feature , limit : 10 } ) ;
59
+ const tableData = useLogsPageData ( ) . logsQueryResult ;
60
60
const logsSearch = useLogsSearch ( ) ;
61
61
const abbreviatedTableData = ( tableData . data ?? [ ] ) . slice ( 0 , 5 ) ;
62
62
const { openDrawer} = useDrawer ( ) ;
@@ -102,7 +102,10 @@ function OurlogsSectionContent({
102
102
// We may change this in the future if we have a trace-group or we generate trace sids for these issue types.
103
103
return null ;
104
104
}
105
- if ( ! tableData || ( tableData . data ?. length === 0 && logsSearch . isEmpty ( ) ) ) {
105
+ if (
106
+ ! tableData ||
107
+ ( tableData . data && tableData . data . length === 0 && logsSearch . isEmpty ( ) )
108
+ ) {
106
109
// Like breadcrumbs, we don't show the logs section if there are no logs.
107
110
return null ;
108
111
}
@@ -127,7 +130,7 @@ function OurlogsSectionContent({
127
130
) ) }
128
131
</ TableBody >
129
132
</ SmallTable >
130
- { tableData . data ? .length > 5 ? (
133
+ { tableData . data && tableData . data . length > 5 ? (
131
134
< div >
132
135
< Button
133
136
icon = { < IconChevron direction = "right" /> }
0 commit comments