Skip to content

Commit

Permalink
feat: suppression de chatwoot (#4630)
Browse files Browse the repository at this point in the history
  • Loading branch information
jenovateurs authored Oct 4, 2024
1 parent 4889e88 commit 93635d6
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 37 deletions.
5 changes: 0 additions & 5 deletions backend/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,6 @@ const config: Configuration = {
url: "https://europe.ipx.com/restapi/v1/sms/send",
internationalDiallingCodes: ["33", "262", "508", "590", "594", "596"],
},
chatwoot: {
websiteToken: isProduction
? "rFbbRuqt9WyC6zbZycr4rj4a"
: "Kzc1NTBxjW9riARcjWTcjHr5",
},
}

export default Object.freeze(config)
3 changes: 0 additions & 3 deletions backend/types/config.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,4 @@ export interface Configuration {
url: string
internationalDiallingCodes: string[]
}
chatwoot: {
websiteToken: string
}
}
26 changes: 0 additions & 26 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,31 +77,5 @@
</noscript>
<!-- built files will be auto injected -->
<div id="app"></div>

<script>
;(function (d, t) {
if (window !== window.top) {
return // Prevents Chatwoot display inside the iframe
}
var BASE_URL = "https://chatwoot.incubateur.net"
var g = d.createElement(t),
s = d.getElementsByTagName(t)[0]
g.src = BASE_URL + "/packs/js/sdk.js"
g.defer = true
g.async = true
s.parentNode.insertBefore(g, s)

g.onload = function () {
window.chatwootSettings = {
hideMessageBubble: false,
position: window.innerWidth >= 768 ? "right" : "left",
}
window.chatwootSDK.run({
websiteToken: "<%= VITE_CHATWOOT_TOKEN %>",
baseUrl: BASE_URL,
})
}
})(document, "script")
</script>
</body>
</html>
3 changes: 0 additions & 3 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ const buildId = Date.now().toString()
const {
baseURL,
contextName,
chatwoot,
contactEmail,
github,
matomo,
Expand Down Expand Up @@ -54,7 +53,6 @@ export default defineConfig(async ({ mode }) => {
VITE_BENEFIT_COUNT: benefitCount,
VITE_MATOMO_ID: matomo.id,
VITE_MATOMO_URL: matomo.url,
VITE_CHATWOOT_TOKEN: chatwoot.websiteToken,
VITE_CONTACT_EMAIL: contactEmail,
VITE_CONTEXT_NAME: contextName,
VITE_BASE_URL: baseURL,
Expand Down Expand Up @@ -121,7 +119,6 @@ export default defineConfig(async ({ mode }) => {
VITE_DESCRIPTION: viteEnvironment.VITE_DESCRIPTION,
VITE_BASE_URL: viteEnvironment.VITE_BASE_URL,
VITE_CONTEXT_NAME: viteEnvironment.VITE_CONTEXT_NAME,
VITE_CHATWOOT_TOKEN: viteEnvironment.VITE_CHATWOOT_TOKEN,
},
},
}),
Expand Down

0 comments on commit 93635d6

Please sign in to comment.