Free & Open-Source Invoice Generator - No Sign-Up, No Ads, Instant PDF Export, 100% In-Browser, and Fully Customizable Templates.
TypeScript fintechinvoiceinvoice-generatorinvoice-pdfinvoice-templateinvoicesnextjsopen-sourcequotesreactreact-pdf-rendererself-hostedshadcn-uitailwindcsstypescript
fix: centralize asset URLs in config and update references across components (#106)
Vlad Sazonaub1b6004ce1e4
diff --git a/e2e/about.test.ts b/e2e/about.test.tsindex 446fb43..05137b4 100644--- a/e2e/about.test.ts+++ b/e2e/about.test.ts@@ -1,4 +1,4 @@-import { VIDEO_DEMO_URL } from "@/config";+import { STATIC_ASSETS_URL, VIDEO_DEMO_URL } from "@/config";import { test, expect } from "@playwright/test";test.describe("About page", () => {@@ -40,7 +40,7 @@ test.describe("About page", () => {await expect(video).toBeVisible();await expect(video).toHaveAttribute("poster",- "https://ik.imagekit.io/fl2lbswwo/easy-invoice-video-placeholder.webp"+ `${STATIC_ASSETS_URL}/easy-invoice-video-placeholder.webp`);await expect(video).toHaveAttribute("muted");await expect(video).toHaveAttribute("loop");diff --git a/src/app/[locale]/about/page.tsx b/src/app/[locale]/about/page.tsxindex 422ad07..31c7160 100644--- a/src/app/[locale]/about/page.tsx+++ b/src/app/[locale]/about/page.tsx@@ -24,7 +24,7 @@ import { useTranslations, type Locale } from "next-intl";import { setRequestLocale } from "next-intl/server";import { type Graph } from "schema-dts";import { LanguageSwitcher } from "./components/language-switcher";-import { VIDEO_DEMO_URL } from "@/config";+import { STATIC_ASSETS_URL, VIDEO_DEMO_URL } from "@/config";const JSON_LD: Graph = {"@context": "https://schema.org",@@ -223,7 +223,7 @@ function HeroSection() {<div className="w-full"><Videosrc={VIDEO_DEMO_URL}- fallbackImg="https://ik.imagekit.io/fl2lbswwo/easy-invoice-video-placeholder.webp"+ fallbackImg={`${STATIC_ASSETS_URL}/easy-invoice-video-placeholder.webp`}testId="hero-about-page-video"/></div>diff --git a/src/app/layout.tsx b/src/app/layout.tsxindex 1c28360..b32ea2c 100644--- a/src/app/layout.tsx+++ b/src/app/layout.tsx@@ -9,7 +9,7 @@ import Script from "next/script";import { type WebSite, type WithContext } from "schema-dts";import { Toaster } from "sonner";-import { APP_URL } from "@/config";+import { APP_URL, STATIC_ASSETS_URL } from "@/config";import "./globals.css";@@ -33,17 +33,17 @@ export const metadata: Metadata = {icons: {icon: [{- url: "https://ik.imagekit.io/fl2lbswwo/favicon.ico?updatedAt=1746617951837",+ url: `${STATIC_ASSETS_URL}/favicon.ico`,},{- url: "https://ik.imagekit.io/fl2lbswwo/icon.png?updatedAt=1746617951770",+ url: `${STATIC_ASSETS_URL}/icon.png`,type: "image/png",sizes: "96x96",},],apple: [{- url: "https://ik.imagekit.io/fl2lbswwo/apple-icon.png?updatedAt=1746617951784",+ url: `${STATIC_ASSETS_URL}/apple-icon.png`,type: "image/png",sizes: "180x180",},diff --git a/src/config.ts b/src/config.tsindex 44bdc24..2fb44ec 100644--- a/src/config.ts+++ b/src/config.ts@@ -4,5 +4,7 @@ export const APP_URL = process.env.VERCEL_PROJECT_PRODUCTION_URL? `https://${process.env.VERCEL_PROJECT_PRODUCTION_URL}`: `http://localhost:${port}`;-export const VIDEO_DEMO_URL =- "https://easy-invoice-pdf-assets.1xeq.workers.dev/easy-invoice-demo.mp4";+export const STATIC_ASSETS_URL =+ "https://easy-invoice-pdf-assets.1xeq.workers.dev";++export const VIDEO_DEMO_URL = `${STATIC_ASSETS_URL}/easy-invoice-demo.mp4`;