mirror of
https://github.com/caty21/forex-dashboard.git
synced 2026-08-18 06:58:06 +00:00
fix: force-dynamic on all API routes + PWA manifest & service worker
- Add export const dynamic = "force-dynamic" to routes previously pre-rendered as static (rate-probabilities, news, fx, yields, calendar) → fixes empty data on Vercel where static pre-render got HTTP 403 - Add PWA: manifest.json, sw.js, icons, layout meta + apple-touch-icon Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
9da463a424
commit
886a5b426f
@@ -1,6 +1,8 @@
|
||||
import { NextResponse } from "next/server";
|
||||
import rateDecisionsData from "@/data/rate_decisions.json";
|
||||
import { fetchFFEvents, nextWeekAvailable } from "@/lib/forexfactory";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
import type { FFEvent } from "@/lib/forexfactory";
|
||||
import type { Currency } from "@/lib/types";
|
||||
import { fetchAllCBPaths, extractMeetingEvents } from "@/lib/rateprobability";
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { NextResponse } from "next/server";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
const CURRENCIES = ["EUR", "GBP", "JPY", "CHF", "CAD", "AUD", "NZD", "SEK"];
|
||||
const AV_BASE = "https://www.alphavantage.co/query";
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@ import { NextResponse } from "next/server";
|
||||
import { fetchAllNews } from "@/lib/newsfeed";
|
||||
import type { NewsItem } from "@/lib/newsfeed";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
export type { NewsItem } from "@/lib/newsfeed";
|
||||
|
||||
let _cache: { data: NewsItem[]; ts: number } | null = null;
|
||||
|
||||
@@ -2,6 +2,8 @@ import { NextResponse } from "next/server";
|
||||
import { fetchAllCBPaths } from "@/lib/rateprobability";
|
||||
import type { RateProbData } from "@/lib/rateprobability";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
export type { RateProbData, CBRatePath, RateProbMeeting } from "@/lib/rateprobability";
|
||||
|
||||
export interface RateProbabilitiesResponse {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { NextResponse } from "next/server";
|
||||
import { fetchTEBondYields } from "@/lib/tebonds";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
// Variation % d'un pair FX vs clôture J-1 (Yahoo Finance, cache 5 min)
|
||||
// Valeur positive = devise X plus forte vs USD (ou USD plus fort si pair inversé)
|
||||
async function fxChangePct(symbol: string, invert = false): Promise<number | null> {
|
||||
|
||||
Reference in New Issue
Block a user