Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/ever-co/ever-teams into …
Browse files Browse the repository at this point in the history
…fix/updated-github-integration-ui
  • Loading branch information
badalkhatri0924 committed Nov 10, 2023
2 parents 5950610 + 0e4cd25 commit c78e925
Show file tree
Hide file tree
Showing 6 changed files with 143 additions and 128 deletions.
2 changes: 1 addition & 1 deletion apps/mobile/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ android {
applicationId 'ever.team'
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 6
versionCode 7
versionName "0.1.0"
}

Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/ios/GauzyTeams/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>4</string>
<string>5</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"@sentry/react-native": "4.15.2",
"@types/react-dom": "~18.0.10",
"apisauce": "3.0.0",

Check warning on line 55 in apps/mobile/package.json

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (apisauce)
"axios": "^1.3.4",
"axios": "^1.6.0",
"date-fns": "^2.29.2",
"expo": "~48.0.9",
"expo-application": "~5.1.1",
Expand Down
8 changes: 4 additions & 4 deletions apps/mobile/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3855,10 +3855,10 @@ axios@^0.27.2:
follow-redirects "^1.14.9"
form-data "^4.0.0"

axios@^1.3.4:
version "1.3.4"
resolved "https://registry.yarnpkg.com/axios/-/axios-1.3.4.tgz#f5760cefd9cfb51fd2481acf88c05f67c4523024"
integrity sha512-toYm+Bsyl6VC5wSkfkbbNB6ROv7KY93PEBBL6xyDczaIHasAiv4wPqQ/c4RjoQzipxRD2W5g21cOqQulZ7rHwQ==
axios@^1.6.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.0.tgz#f1e5292f26b2fd5c2e66876adc5b06cdbd7d2102"
integrity sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg==
dependencies:
follow-redirects "^1.15.0"
form-data "^4.0.0"
Expand Down
60 changes: 44 additions & 16 deletions apps/web/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,41 +1,44 @@
/* eslint-disable no-mixed-spaces-and-tabs */
import 'react-loading-skeleton/dist/skeleton.css';
import '../styles/globals.css';
import { GA_MEASUREMENT_ID, jitsuConfiguration } from '@app/constants';
import { JitsuProvider } from '@jitsu/jitsu-react';
import { Analytics } from '@vercel/analytics/react';
import { AppState } from 'lib/app/init-state';
import ChatwootWidget from 'lib/features/integrations/chatwoot';
import { NextPage, NextPageContext } from 'next';
import { ThemeProvider } from 'next-themes';
import type { AppProps } from 'next/app';
import Head from 'next/head';
import Script from 'next/script';
import { I18nextProvider } from 'react-i18next';
import { SkeletonTheme } from 'react-loading-skeleton';
import 'react-loading-skeleton/dist/skeleton.css';
import { RecoilRoot } from 'recoil';
import { JitsuAnalytics } from '../lib/components/services/jitsu-analytics';
import i18n from '../ni18n.config';
import '../styles/globals.css';

const MyApp = ({ Component, pageProps }: AppProps) => {
const jitsuConf = jitsuConfiguration();
const jitsuConf = pageProps?.jitsuConf;
console.log('Jitsu Host', pageProps);
console.log(`Jitsu Configuration: ${JSON.stringify(jitsuConf)}`);
const isJitsuEnvsPresent: boolean = jitsuConf.host !== '' && jitsuConf.writeKey !== '';

const isJitsuEnvsPresent: boolean = jitsuConf?.host !== '' && jitsuConf?.writeKey !== '';
console.log(`Jitsu Enabled: ${isJitsuEnvsPresent}`);

return (
<>
{GA_MEASUREMENT_ID && (
<>
<Script
strategy="lazyOnload"
src={`https://www.googletagmanager.com/gtag/js?id=${GA_MEASUREMENT_ID}`}
/>
<Script strategy="lazyOnload" id="google-analytic-script">
{` window.dataLayer = window.dataLayer || [];
strategy="lazyOnload"
src={`https://www.googletagmanager.com/gtag/js?id=${GA_MEASUREMENT_ID}`}
/>
<Script strategy="lazyOnload" id="google-analytic-script">
{` window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '${GA_MEASUREMENT_ID}');`}
</Script>
</Script>
</>
)}

Expand All @@ -48,12 +51,12 @@ const MyApp = ({ Component, pageProps }: AppProps) => {
options={
isJitsuEnvsPresent
? {
host: jitsuConf.host ?? '',
writeKey: jitsuConf.writeKey ?? undefined,
debug: jitsuConf.debug,
cookieDomain: jitsuConf.cookieDomain ?? undefined,
echoEvents: jitsuConf.echoEvents,
}
host: jitsuConf.host ?? '',
writeKey: jitsuConf.writeKey ?? undefined,
debug: jitsuConf.debug,
cookieDomain: jitsuConf.cookieDomain ?? undefined,
echoEvents: jitsuConf.echoEvents
}
: {
disabled: true
}
Expand All @@ -76,4 +79,29 @@ const MyApp = ({ Component, pageProps }: AppProps) => {
</>
);
};

MyApp.getInitialProps = async ({ Component, ctx }: { Component: NextPage<AppProps>; ctx: NextPageContext }) => {
// Recover environment variables
const jitsuHost = process.env.NEXT_JITSU_BROWSER_URL;
const jitsuWriteKey = process.env.NEXT_JITSU_BROWSER_WRITE_KEY;

const jitsuConf = jitsuConfiguration();
// Call the static method getInitialProps
// of the page component if it exists
let pageProps = {};

if (Component.getInitialProps) {
pageProps = await Component.getInitialProps(ctx);
}

return {
pageProps: {
...pageProps,
jitsuConf,
jitsuHost,
jitsuWriteKey
}
};
};

export default MyApp;
Loading

0 comments on commit c78e925

Please sign in to comment.