Skip to content

Commit 87fd95f

Browse files
committed
fix merge
1 parent 1f96d8a commit 87fd95f

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

static/app/components/events/ourlogs/ourlogsSection.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ import {trackAnalytics} from 'sentry/utils/analytics';
1313
import {LogsAnalyticsPageSource} from 'sentry/utils/analytics/logsAnalyticsEvent';
1414
import useOrganization from 'sentry/utils/useOrganization';
1515
import {TableBody} from 'sentry/views/explore/components/table';
16+
import {useLogsPageData} from 'sentry/views/explore/contexts/logs/logsPageData';
1617
import {
1718
LogsPageParamsProvider,
1819
useLogsSearch,
1920
} from 'sentry/views/explore/contexts/logs/logsPageParams';
2021
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';
2323
import {TraceItemDataset} from 'sentry/views/explore/types';
2424
import {SectionKey} from 'sentry/views/issueDetails/streamline/context';
2525
import {InterimSection} from 'sentry/views/issueDetails/streamline/interimSection';
@@ -56,7 +56,7 @@ function OurlogsSectionContent({
5656
}) {
5757
const organization = useOrganization();
5858
const feature = organization.features.includes('ourlogs-enabled');
59-
const tableData = useExploreLogsTable({enabled: feature, limit: 10});
59+
const tableData = useLogsPageData().logsQueryResult;
6060
const logsSearch = useLogsSearch();
6161
const abbreviatedTableData = (tableData.data ?? []).slice(0, 5);
6262
const {openDrawer} = useDrawer();
@@ -102,7 +102,10 @@ function OurlogsSectionContent({
102102
// We may change this in the future if we have a trace-group or we generate trace sids for these issue types.
103103
return null;
104104
}
105-
if (!tableData || (tableData.data?.length === 0 && logsSearch.isEmpty())) {
105+
if (
106+
!tableData ||
107+
(tableData.data && tableData.data.length === 0 && logsSearch.isEmpty())
108+
) {
106109
// Like breadcrumbs, we don't show the logs section if there are no logs.
107110
return null;
108111
}
@@ -127,7 +130,7 @@ function OurlogsSectionContent({
127130
))}
128131
</TableBody>
129132
</SmallTable>
130-
{tableData.data?.length > 5 ? (
133+
{tableData.data && tableData.data.length > 5 ? (
131134
<div>
132135
<Button
133136
icon={<IconChevron direction="right" />}

0 commit comments

Comments
 (0)