From 12c3ddc31dd9eed4f120e1024ec31f4e2dbc01b5 Mon Sep 17 00:00:00 2001 From: kieran Date: Wed, 27 Nov 2024 14:39:57 +0000 Subject: [PATCH] fix: expired link --- .env | 1 + .env.development | 1 + src/components/vps-instance.tsx | 6 +++--- src/const.ts | 3 +-- 4 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 .env create mode 100644 .env.development diff --git a/.env b/.env new file mode 100644 index 0000000..225fca9 --- /dev/null +++ b/.env @@ -0,0 +1 @@ +VITE_API_URL="https://api.lnvps.net" \ No newline at end of file diff --git a/.env.development b/.env.development new file mode 100644 index 0000000..3b60c35 --- /dev/null +++ b/.env.development @@ -0,0 +1 @@ +VITE_API_URL="http://localhost:8000" \ No newline at end of file diff --git a/src/components/vps-instance.tsx b/src/components/vps-instance.tsx index 7caf582..7df8287 100644 --- a/src/components/vps-instance.tsx +++ b/src/components/vps-instance.tsx @@ -26,7 +26,7 @@ export default function VpsInstanceRow({ vm, actions }: { vm: VmInstance, action - {(actions ?? true) &&
+
{isExpired && ( <> @@ -34,8 +34,8 @@ export default function VpsInstanceRow({ vm, actions }: { vm: VmInstance, action )} - {!isExpired && } -
} + {!isExpired && (actions ?? true) && } +
); } diff --git a/src/const.ts b/src/const.ts index 592a74c..a85dd7c 100644 --- a/src/const.ts +++ b/src/const.ts @@ -12,8 +12,7 @@ export const GB = KB * 1000; export const TB = GB * 1000; export const PB = TB * 1000; -//export const ApiUrl = "http://localhost:8000"; -export const ApiUrl = "https://api.lnvps.net"; +export const ApiUrl = import.meta.env.VITE_API_URL; export const NostrProfile = new NostrLink( NostrPrefix.Profile,