Add research workspace and graphing flows
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
import { useQueryClient } from '@tanstack/react-query';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { useCallback } from 'react';
|
||||
import { buildGraphingHref } from '@/lib/graphing/catalog';
|
||||
import {
|
||||
aiReportQueryOptions,
|
||||
companyAnalysisQueryOptions,
|
||||
@@ -12,6 +13,7 @@ import {
|
||||
latestPortfolioInsightQueryOptions,
|
||||
portfolioSummaryQueryOptions,
|
||||
recentTasksQueryOptions,
|
||||
researchWorkspaceQueryOptions,
|
||||
watchlistQueryOptions
|
||||
} from '@/lib/query/options';
|
||||
|
||||
@@ -30,14 +32,19 @@ export function useLinkPrefetch() {
|
||||
}
|
||||
|
||||
const analysisHref = `/analysis?ticker=${encodeURIComponent(normalizedTicker)}`;
|
||||
const researchHref = `/research?ticker=${encodeURIComponent(normalizedTicker)}`;
|
||||
const filingsHref = `/filings?ticker=${encodeURIComponent(normalizedTicker)}`;
|
||||
const financialsHref = `/financials?ticker=${encodeURIComponent(normalizedTicker)}`;
|
||||
const graphingHref = buildGraphingHref(normalizedTicker);
|
||||
|
||||
router.prefetch(analysisHref);
|
||||
router.prefetch(researchHref);
|
||||
router.prefetch(filingsHref);
|
||||
router.prefetch(financialsHref);
|
||||
router.prefetch(graphingHref);
|
||||
|
||||
void queryClient.prefetchQuery(companyAnalysisQueryOptions(normalizedTicker));
|
||||
void queryClient.prefetchQuery(researchWorkspaceQueryOptions(normalizedTicker));
|
||||
void queryClient.prefetchQuery(companyFinancialStatementsQueryOptions({
|
||||
ticker: normalizedTicker,
|
||||
surfaceKind: 'income_statement',
|
||||
|
||||
Reference in New Issue
Block a user