mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-19 01:03:57 +00:00
feat: open checkout page
This commit is contained in:
1
src/renderer/src/declaration.d.ts
vendored
1
src/renderer/src/declaration.d.ts
vendored
@@ -162,6 +162,7 @@ declare global {
|
||||
|
||||
/* Misc */
|
||||
openExternal: (src: string) => Promise<void>;
|
||||
openCheckout: () => Promise<void>;
|
||||
getVersion: () => Promise<string>;
|
||||
ping: () => string;
|
||||
getDefaultDownloadsPath: () => Promise<string>;
|
||||
|
||||
@@ -34,7 +34,7 @@ export function GameDetailsContent() {
|
||||
hasNSFWContentBlocked,
|
||||
} = useContext(gameDetailsContext);
|
||||
|
||||
const { userDetails } = useUserDetails();
|
||||
const { userDetails, hasActiveSubscription } = useUserDetails();
|
||||
|
||||
const { setShowCloudSyncModal, getGameBackupPreview } =
|
||||
useContext(cloudSyncContext);
|
||||
@@ -103,6 +103,11 @@ export function GameDetailsContent() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!hasActiveSubscription) {
|
||||
window.electron.openCheckout();
|
||||
return;
|
||||
}
|
||||
|
||||
setShowCloudSyncModal(true);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user