mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: open checkout page
This commit is contained in:
parent
6ef1135ba2
commit
21fecb2c4e
6 changed files with 32 additions and 8 deletions
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);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue