feat: use env

This commit is contained in:
Zamitto 2024-10-21 15:38:43 -03:00
parent 6d1f290895
commit b7f717a6f4
2 changed files with 6 additions and 1 deletions

View File

@ -14,8 +14,12 @@ const openCheckout = async (_event: Electron.IpcMainInvokeEvent) => {
refreshToken: userAuth.refreshToken,
}).then((response) => response.accessToken);
const params = new URLSearchParams({
token: paymentToken,
});
shell.openExternal(
"https://checkout.hydralauncher.gg/?token=" + paymentToken
`${import.meta.env.MAIN_VITE_CHECKOUT_URL}?${params.toString()}`
);
};

View File

@ -5,6 +5,7 @@ interface ImportMetaEnv {
readonly MAIN_VITE_API_URL: string;
readonly MAIN_VITE_AUTH_URL: string;
readonly MAIN_VITE_SENTRY_DSN: string;
readonly MAIN_VITE_CHECKOUT_URL: string;
}
interface ImportMeta {