Skip to content

Commit b82fc2a

Browse files
authored
Merge pull request #609 from Alt-Org/eleino/feature/606-implement-google-analytics-and-perform-minor-uicontent-fixes
Eleino/feature/606 implement google analytics and perform minor uicontent fixes
2 parents 8c8b583 + e1f314c commit b82fc2a

File tree

6 files changed

+38
-8
lines changed

6 files changed

+38
-8
lines changed

frontend-next-migration/package-lock.json

Lines changed: 24 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend-next-migration/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"@fortawesome/react-fontawesome": "^0.2.0",
3838
"@hookform/resolvers": "^3.3.2",
3939
"@next/bundle-analyzer": "^14.0.1",
40+
"@next/third-parties": "^16.0.8",
4041
"@reduxjs/toolkit": "^1.9.7",
4142
"accept-language": "^3.0.18",
4243
"html-react-parser": "^5.1.1",

frontend-next-migration/src/app/[lng]/layout.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import localFont from 'next/font/local';
1111
//import CookieConsentV2 from '@/features/CookieConsentV2/CookieConsentV2';
1212
import { CookieConsentV3 } from '@/features/CookieConsentV3';
1313
import { baseUrl, defaultOpenGraph } from '@/shared/seoConstants';
14+
import { GoogleAnalytics } from '@next/third-parties/google';
15+
import { envHelper } from '@/shared/const/envHelper';
1416
// const openSans = Open_Sans({
1517
// subsets: ['latin'],
1618
// display: 'swap',
@@ -99,6 +101,8 @@ export default function RootLayout(props: Props) {
99101

100102
const { lng } = params;
101103

104+
const GA_ID = envHelper.isDevMode ? envHelper.gaDevId : envHelper.gaProdId;
105+
102106
return (
103107
<html
104108
lang={lng}
@@ -128,6 +132,7 @@ export default function RootLayout(props: Props) {
128132
</Providers>
129133
</LayoutWithBackground>
130134
</body>
135+
{GA_ID && <GoogleAnalytics gaId={GA_ID} />}
131136
</html>
132137
);
133138
}

frontend-next-migration/src/preparedPages/NewsPages/ui/NewsElementPage/ui/NewsElementPage.module.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@
6565
object-position: center;
6666
align-self: center;
6767
box-shadow: var(--s-blur);
68+
@media (max-width: breakpoint(md)) {
69+
width: auto;
70+
height: 75%;
71+
}
6872
}
6973

7074
.imageBlur {

frontend-next-migration/src/shared/appLinks/appExternalLinks.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ export const AppExternalLinks = {
2626
dlpackage: 'https://drive.google.com/file/d/16MJzw25RAzV0uH6m9VzReYGFCExK23Uh/view',
2727
pastversions: 'https://drive.google.com/drive/folders/1n5GVJVXFF2F1sF5-C07uYkFNd9Bsdxzu',
2828
prgActivityReport:
29-
'https://drive.google.com/file/d/1UATY417TZnsShxNQGagV6JcJOsElvaB5/view?usp=drive_link',
29+
'https://drive.google.com/file/d/1UkBPyRLEcbWwbUy37tmHCMcr5AYzbZHe/view?usp=drive_link',
3030
prgBylaws:
3131
'https://drive.google.com/file/d/1_ek4eGfbxbCYLliY53gLIs0Gv2pwRkhw/view?usp=drive_link',
3232
prgActionPlan:
33-
'https://drive.google.com/file/d/1PdeCJNDY4yz5y7hQzRGpYrJF0q8Eqt9L/view?usp=drive_link',
33+
'https://drive.google.com/file/d/1fu_iab151a2sNvaSp_U8-zKJKdvVhnhz/view?usp=drive_link',
3434
} as const;

frontend-next-migration/src/shared/const/envHelper.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,6 @@ export const envHelper = {
2121
strapiHost: process.env.NEXT_PUBLIC_STRAPI_HOST || '',
2222
directusHost: process.env.NEXT_PUBLIC_DIRECTUS_HOST || '',
2323
openAiApiKey: process.env.NEXT_PUBLIC_LLM_HOST || '',
24+
gaProdId: process.env.NEXT_PUBLIC_GA_PROD_ID || '',
25+
gaDevId: process.env.NEXT_PUBLIC_GA_DEV_ID || '',
2426
} as const;

0 commit comments

Comments
 (0)