From 590a1b354de710247d3a947081c9a7cfa8f8d2d1 Mon Sep 17 00:00:00 2001 From: Zamitto <167933696+zamitto@users.noreply.github.com> Date: Wed, 4 Dec 2024 01:57:47 -0300 Subject: [PATCH] chore: remove intercom dependency --- package.json | 1 - src/renderer/src/app.tsx | 15 +-------------- src/types/index.ts | 1 + yarn.lock | 5 ----- 4 files changed, 2 insertions(+), 20 deletions(-) diff --git a/package.json b/package.json index bcc1c6f5..68dfb39a 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,6 @@ "@electron-toolkit/utils": "^3.0.0", "@fontsource/noto-sans": "^5.0.22", "@hookform/resolvers": "^3.9.0", - "@intercom/messenger-js-sdk": "^0.0.14", "@primer/octicons-react": "^19.9.0", "@reduxjs/toolkit": "^2.2.3", "@vanilla-extract/css": "^1.14.2", diff --git a/src/renderer/src/app.tsx b/src/renderer/src/app.tsx index 20810070..e6f8e17d 100644 --- a/src/renderer/src/app.tsx +++ b/src/renderer/src/app.tsx @@ -120,20 +120,7 @@ export function App() { updateUserDetails(response); syncFriendRequests(); - const $existingScript = document.getElementById("user-details"); - - const content = `window.userDetails = ${JSON.stringify(response)};`; - - if ($existingScript) { - $existingScript.textContent = content; - } else { - const $script = document.createElement("script"); - $script.id = "user-details"; - $script.type = "text/javascript"; - $script.textContent = content; - - document.head.appendChild($script); - } + window["userDetails"] = response; } }) .finally(() => { diff --git a/src/types/index.ts b/src/types/index.ts index c0269cd3..434a15e7 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -241,6 +241,7 @@ export interface Subscription { status: SubscriptionStatus; plan: { id: string; name: string }; expiresAt: string | null; + paymentMethod: "pix" | "paypal"; } export interface UserDetails { diff --git a/yarn.lock b/yarn.lock index 0220a873..b6b2d3b9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1066,11 +1066,6 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz#4a2868d75d6d6963e423bcf90b7fd1be343409d3" integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA== -"@intercom/messenger-js-sdk@^0.0.14": - version "0.0.14" - resolved "https://registry.yarnpkg.com/@intercom/messenger-js-sdk/-/messenger-js-sdk-0.0.14.tgz#a27999370cc0a82a2a57a779426df25a57891863" - integrity sha512-2dH4BDAh9EI90K7hUkAdZ76W79LM45Sd1OBX7t6Vzy8twpNiQ5X+7sH9G5hlJlkSGnf+vFWlFcy9TOYAyEs1hA== - "@isaacs/cliui@^8.0.2": version "8.0.2" resolved "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz"