From f102a43dc29b1996188717b931c5ef44b30eeed0 Mon Sep 17 00:00:00 2001 From: "Ng Wing Tat, David" Date: Thu, 5 Oct 2023 18:03:13 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=90=9B=20Make=20static=20asset=20URLs?= =?UTF-8?q?=20varies=20with=20port?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/constants/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/constants/index.ts b/src/constants/index.ts index 82aacf7..4f0dadb 100644 --- a/src/constants/index.ts +++ b/src/constants/index.ts @@ -1,7 +1,7 @@ export const ASSETS_ROOT = process.env.NODE_ENV === 'production' ? 'https://static.like.co/edm' - : 'http://localhost:3000/static'; + : `http://localhost:${process.env.PORT || '3000'}/static`; export const DEFAULT_AVATAR_URL = `${ASSETS_ROOT}/default-avatar.jpg`; From e70362b58cdd259d692a2da45977e7b04d398f39 Mon Sep 17 00:00:00 2001 From: "Ng Wing Tat, David" Date: Thu, 5 Oct 2023 23:08:32 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E2=9C=A8=20Add=20basic=20v2=20template?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/index.html | 9 +++++ example/index.ts | 6 ++++ src/index.tsx | 13 +++++++ src/templates/basic-v2.tsx | 71 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 99 insertions(+) create mode 100644 src/templates/basic-v2.tsx diff --git a/example/index.html b/example/index.html index f8ae584..314f52d 100644 --- a/example/index.html +++ b/example/index.html @@ -17,6 +17,15 @@

Basic

+

Basic V2

+ +

New supporter