Compare commits
No commits in common. "d03f3fe9c9c9bbbbc2a231bd61c18b933addc613" and "b079aec0be16c2b4138079021044add1d53904f3" have entirely different histories.
d03f3fe9c9
...
b079aec0be
|
|
@ -38,15 +38,6 @@ export function useReport(id: string | undefined): UseReportResult {
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// Source 0: Demo mode — ALWAYS takes priority over any other source
|
|
||||||
if (id === 'view-clinic') {
|
|
||||||
setData(mockReport);
|
|
||||||
setIsEnriched(true);
|
|
||||||
setSocialHandles({ instagram: '@viewplastic', youtube: '@ViewclinicKR', facebook: 'viewps1' });
|
|
||||||
setIsLoading(false);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const state = location.state as LocationState | undefined;
|
const state = location.state as LocationState | undefined;
|
||||||
|
|
||||||
// Source 1: Report data passed via navigation state (from AnalysisLoadingPage)
|
// Source 1: Report data passed via navigation state (from AnalysisLoadingPage)
|
||||||
|
|
@ -77,7 +68,16 @@ export function useReport(id: string | undefined): UseReportResult {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Source 2: Fetch from Supabase by report ID (bookmarked/shared link)
|
// Source 2: Demo mode — return hardcoded mock data for sales prototype
|
||||||
|
if (id === 'view-clinic') {
|
||||||
|
setData(mockReport);
|
||||||
|
setIsEnriched(true);
|
||||||
|
setSocialHandles({ instagram: '@viewplastic', youtube: '@ViewclinicKR', facebook: 'viewps1' });
|
||||||
|
setIsLoading(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Source 3: Fetch from Supabase by report ID (bookmarked/shared link)
|
||||||
if (id) {
|
if (id) {
|
||||||
fetchReportById(id)
|
fetchReportById(id)
|
||||||
.then((row) => {
|
.then((row) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue