This commit is contained in:
parent
62b82788b8
commit
2a8bc6ade8
|
|
@ -130,22 +130,24 @@ function HistoryChatContent() {
|
||||||
} else if (isAuthenticated && isCloudSyncEnabled()) {
|
} else if (isAuthenticated && isCloudSyncEnabled()) {
|
||||||
// Fallback to cloud
|
// Fallback to cloud
|
||||||
const cloudReports = await getCloudReports();
|
const cloudReports = await getCloudReports();
|
||||||
const cloudMatch = cloudReports.find(
|
if (cloudReports) {
|
||||||
(r) =>
|
const cloudMatch = cloudReports.find(
|
||||||
r.ticker === ticker &&
|
(r) =>
|
||||||
r.analysis_date === dateStr &&
|
r.ticker === ticker &&
|
||||||
r.market_type === market
|
r.analysis_date === dateStr &&
|
||||||
);
|
r.market_type === market
|
||||||
if (cloudMatch) {
|
);
|
||||||
setReport({
|
if (cloudMatch) {
|
||||||
id: parseInt(cloudMatch.id.replace(/-/g, "").slice(0, 8), 16),
|
setReport({
|
||||||
ticker: cloudMatch.ticker,
|
id: parseInt(cloudMatch.id.replace(/-/g, "").slice(0, 8), 16),
|
||||||
market_type: cloudMatch.market_type as any,
|
ticker: cloudMatch.ticker,
|
||||||
analysis_date: cloudMatch.analysis_date,
|
market_type: cloudMatch.market_type as any,
|
||||||
saved_at: new Date(cloudMatch.created_at),
|
analysis_date: cloudMatch.analysis_date,
|
||||||
result: cloudMatch.result,
|
saved_at: new Date(cloudMatch.created_at),
|
||||||
language: cloudMatch.language,
|
result: cloudMatch.result,
|
||||||
});
|
language: cloudMatch.language,
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue