jbilcke-hf HF staff commited on
Commit
3e623a9
1 Parent(s): dd2f9fa

add banner

Browse files
Files changed (4) hide show
  1. package-lock.json +60 -84
  2. package.json +1 -0
  3. src/app/layout.tsx +2 -28
  4. src/app/main.tsx +36 -0
package-lock.json CHANGED
@@ -82,6 +82,7 @@
82
  "react-circular-progressbar": "^2.1.0",
83
  "react-copy-to-clipboard": "^5.1.0",
84
  "react-dom": "18.2.0",
 
85
  "react-icons": "^4.12.0",
86
  "react-photo-sphere-viewer": "^5.0.2-psv5.7.1",
87
  "react-smooth-scroll-hook": "^1.3.4",
@@ -199,9 +200,9 @@
199
  }
200
  },
201
  "node_modules/@emotion/is-prop-valid": {
202
- "version": "1.2.1",
203
- "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.2.1.tgz",
204
- "integrity": "sha512-61Mf7Ufx4aDxx1xlDeOm8aFFigGHE4z+0sKCa+IHCeZKiyP9RLD0Mmx7m8b9/Cf37f7NAvQOOJAbQQGVr5uERw==",
205
  "dependencies": {
206
  "@emotion/memoize": "^0.8.1"
207
  }
@@ -3062,9 +3063,9 @@
3062
  "integrity": "sha512-YIoDCTH3Af6XM5VuwGG/QL/CJqga1Zm3NkU3HZ4ZHK2fRMPYP1VczsTUqtsf43PH/iJNVlPHAo2oWX7BSdB2Hw=="
3063
  },
3064
  "node_modules/@types/stylis": {
3065
- "version": "4.2.0",
3066
- "resolved": "https://registry.npmjs.org/@types/stylis/-/stylis-4.2.0.tgz",
3067
- "integrity": "sha512-n4sx2bqL0mW1tvDf/loQ+aMX7GQD3lc3fkCMC55VFNDu/vBOabO+LTIeXKM14xK0ppk5TUGcWRjiSpIlUpghKw=="
3068
  },
3069
  "node_modules/@types/uuid": {
3070
  "version": "9.0.8",
@@ -3829,6 +3830,11 @@
3829
  "node": ">=6"
3830
  }
3831
  },
 
 
 
 
 
3832
  "node_modules/client-only": {
3833
  "version": "0.0.1",
3834
  "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz",
@@ -4317,9 +4323,9 @@
4317
  "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA=="
4318
  },
4319
  "node_modules/electron-to-chromium": {
4320
- "version": "1.4.757",
4321
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.757.tgz",
4322
- "integrity": "sha512-jftDaCknYSSt/+KKeXzH3LX5E2CvRLm75P3Hj+J/dv3CL0qUYcOt13d5FN1NiL5IJbbhzHrb3BomeG2tkSlZmw=="
4323
  },
4324
  "node_modules/elliptic": {
4325
  "version": "6.5.4",
@@ -6233,14 +6239,11 @@
6233
  }
6234
  },
6235
  "node_modules/lru-cache": {
6236
- "version": "6.0.0",
6237
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
6238
- "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
6239
- "dependencies": {
6240
- "yallist": "^4.0.0"
6241
- },
6242
  "engines": {
6243
- "node": ">=10"
6244
  }
6245
  },
6246
  "node_modules/lucide-react": {
@@ -6817,14 +6820,6 @@
6817
  "url": "https://github.com/sponsors/isaacs"
6818
  }
6819
  },
6820
- "node_modules/path-scurry/node_modules/lru-cache": {
6821
- "version": "10.2.2",
6822
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz",
6823
- "integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==",
6824
- "engines": {
6825
- "node": "14 || >=16.14"
6826
- }
6827
- },
6828
  "node_modules/path-type": {
6829
  "version": "4.0.0",
6830
  "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
@@ -7162,6 +7157,19 @@
7162
  "react": "^18.2.0"
7163
  }
7164
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
7165
  "node_modules/react-icons": {
7166
  "version": "4.12.0",
7167
  "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-4.12.0.tgz",
@@ -7283,6 +7291,19 @@
7283
  }
7284
  }
7285
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
7286
  "node_modules/react-tuby": {
7287
  "version": "0.1.24",
7288
  "resolved": "https://registry.npmjs.org/react-tuby/-/react-tuby-0.1.24.tgz",
@@ -7526,12 +7547,9 @@
7526
  "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA=="
7527
  },
7528
  "node_modules/semver": {
7529
- "version": "7.6.0",
7530
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz",
7531
- "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==",
7532
- "dependencies": {
7533
- "lru-cache": "^6.0.0"
7534
- },
7535
  "bin": {
7536
  "semver": "bin/semver.js"
7537
  },
@@ -7904,19 +7922,19 @@
7904
  "integrity": "sha512-NnzSOEKyv4I83qbuKw9ROtJrrT6Z/Xt7I0HiP/e6H6GnpeTDvzwGIGeJ8slai+VwODSHQDooW2CAilJwT9SpRg=="
7905
  },
7906
  "node_modules/styled-components": {
7907
- "version": "6.1.9",
7908
- "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-6.1.9.tgz",
7909
- "integrity": "sha512-aBOqs0uMsYufFXSE4q6cA6Ty1fwZuMk4BJRHfiGSna59F1otnxiDelwhN4fEwmBtIymmF0ZqXHnpSigr2ps9Cg==",
7910
  "dependencies": {
7911
- "@emotion/is-prop-valid": "1.2.1",
7912
  "@emotion/unitless": "0.8.1",
7913
- "@types/stylis": "4.2.0",
7914
  "css-to-react-native": "3.2.0",
7915
- "csstype": "3.1.2",
7916
- "postcss": "8.4.31",
7917
  "shallowequal": "1.1.0",
7918
- "stylis": "4.3.1",
7919
- "tslib": "2.5.0"
7920
  },
7921
  "engines": {
7922
  "node": ">= 16"
@@ -7930,43 +7948,6 @@
7930
  "react-dom": ">= 16.8.0"
7931
  }
7932
  },
7933
- "node_modules/styled-components/node_modules/csstype": {
7934
- "version": "3.1.2",
7935
- "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz",
7936
- "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ=="
7937
- },
7938
- "node_modules/styled-components/node_modules/postcss": {
7939
- "version": "8.4.31",
7940
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz",
7941
- "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==",
7942
- "funding": [
7943
- {
7944
- "type": "opencollective",
7945
- "url": "https://opencollective.com/postcss/"
7946
- },
7947
- {
7948
- "type": "tidelift",
7949
- "url": "https://tidelift.com/funding/github/npm/postcss"
7950
- },
7951
- {
7952
- "type": "github",
7953
- "url": "https://github.com/sponsors/ai"
7954
- }
7955
- ],
7956
- "dependencies": {
7957
- "nanoid": "^3.3.6",
7958
- "picocolors": "^1.0.0",
7959
- "source-map-js": "^1.0.2"
7960
- },
7961
- "engines": {
7962
- "node": "^10 || ^12 || >=14"
7963
- }
7964
- },
7965
- "node_modules/styled-components/node_modules/tslib": {
7966
- "version": "2.5.0",
7967
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz",
7968
- "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg=="
7969
- },
7970
  "node_modules/styled-jsx": {
7971
  "version": "5.1.1",
7972
  "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.1.1.tgz",
@@ -7990,9 +7971,9 @@
7990
  }
7991
  },
7992
  "node_modules/stylis": {
7993
- "version": "4.3.1",
7994
- "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.1.tgz",
7995
- "integrity": "sha512-EQepAV+wMsIaGVGX1RECzgrcqRRU/0sYOHkeLsZ3fzHaHXZy4DaOOX0vOlGQdlsjkh3mFHAIlVimpwAs4dslyQ=="
7996
  },
7997
  "node_modules/sucrase": {
7998
  "version": "3.35.0",
@@ -8827,11 +8808,6 @@
8827
  "node": ">=0.10.32"
8828
  }
8829
  },
8830
- "node_modules/yallist": {
8831
- "version": "4.0.0",
8832
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
8833
- "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
8834
- },
8835
  "node_modules/yaml": {
8836
  "version": "2.4.2",
8837
  "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.2.tgz",
 
82
  "react-circular-progressbar": "^2.1.0",
83
  "react-copy-to-clipboard": "^5.1.0",
84
  "react-dom": "18.2.0",
85
+ "react-hook-consent": "^3.5.3",
86
  "react-icons": "^4.12.0",
87
  "react-photo-sphere-viewer": "^5.0.2-psv5.7.1",
88
  "react-smooth-scroll-hook": "^1.3.4",
 
200
  }
201
  },
202
  "node_modules/@emotion/is-prop-valid": {
203
+ "version": "1.2.2",
204
+ "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.2.2.tgz",
205
+ "integrity": "sha512-uNsoYd37AFmaCdXlg6EYD1KaPOaRWRByMCYzbKUX4+hhMfrxdVSelShywL4JVaAeM/eHUOSprYBQls+/neX3pw==",
206
  "dependencies": {
207
  "@emotion/memoize": "^0.8.1"
208
  }
 
3063
  "integrity": "sha512-YIoDCTH3Af6XM5VuwGG/QL/CJqga1Zm3NkU3HZ4ZHK2fRMPYP1VczsTUqtsf43PH/iJNVlPHAo2oWX7BSdB2Hw=="
3064
  },
3065
  "node_modules/@types/stylis": {
3066
+ "version": "4.2.5",
3067
+ "resolved": "https://registry.npmjs.org/@types/stylis/-/stylis-4.2.5.tgz",
3068
+ "integrity": "sha512-1Xve+NMN7FWjY14vLoY5tL3BVEQ/n42YLwaqJIPYhotZ9uBHt87VceMwWQpzmdEt2TNXIorIFG+YeCUUW7RInw=="
3069
  },
3070
  "node_modules/@types/uuid": {
3071
  "version": "9.0.8",
 
3830
  "node": ">=6"
3831
  }
3832
  },
3833
+ "node_modules/classnames": {
3834
+ "version": "2.5.1",
3835
+ "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz",
3836
+ "integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow=="
3837
+ },
3838
  "node_modules/client-only": {
3839
  "version": "0.0.1",
3840
  "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz",
 
4323
  "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA=="
4324
  },
4325
  "node_modules/electron-to-chromium": {
4326
+ "version": "1.4.758",
4327
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.758.tgz",
4328
+ "integrity": "sha512-/o9x6TCdrYZBMdGeTifAP3wlF/gVT+TtWJe3BSmtNh92Mw81U9hrYwW9OAGUh+sEOX/yz5e34sksqRruZbjYrw=="
4329
  },
4330
  "node_modules/elliptic": {
4331
  "version": "6.5.4",
 
6239
  }
6240
  },
6241
  "node_modules/lru-cache": {
6242
+ "version": "10.2.2",
6243
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz",
6244
+ "integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==",
 
 
 
6245
  "engines": {
6246
+ "node": "14 || >=16.14"
6247
  }
6248
  },
6249
  "node_modules/lucide-react": {
 
6820
  "url": "https://github.com/sponsors/isaacs"
6821
  }
6822
  },
 
 
 
 
 
 
 
 
6823
  "node_modules/path-type": {
6824
  "version": "4.0.0",
6825
  "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
 
7157
  "react": "^18.2.0"
7158
  }
7159
  },
7160
+ "node_modules/react-hook-consent": {
7161
+ "version": "3.5.3",
7162
+ "resolved": "https://registry.npmjs.org/react-hook-consent/-/react-hook-consent-3.5.3.tgz",
7163
+ "integrity": "sha512-/HUD/zw2fJbERVHIMYwbfI5WStizTjgVX7qFS8QLaFTdGOSJ7RLa7zMYrnieqW7KqtL5qriUhxySaATfanAvfA==",
7164
+ "dependencies": {
7165
+ "object-hash": "^3.0.0",
7166
+ "react-toggle": "^4.1.3"
7167
+ },
7168
+ "peerDependencies": {
7169
+ "react": ">=16.8.0",
7170
+ "react-dom": ">=16.8.0"
7171
+ }
7172
+ },
7173
  "node_modules/react-icons": {
7174
  "version": "4.12.0",
7175
  "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-4.12.0.tgz",
 
7291
  }
7292
  }
7293
  },
7294
+ "node_modules/react-toggle": {
7295
+ "version": "4.1.3",
7296
+ "resolved": "https://registry.npmjs.org/react-toggle/-/react-toggle-4.1.3.tgz",
7297
+ "integrity": "sha512-WoPrvbwfQSvoagbrDnXPrlsxwzuhQIrs+V0I162j/s+4XPgY/YDAUmHSeWiroznfI73wj+MBydvW95zX8ABbSg==",
7298
+ "dependencies": {
7299
+ "classnames": "^2.2.5"
7300
+ },
7301
+ "peerDependencies": {
7302
+ "prop-types": ">= 15.3.0 < 19",
7303
+ "react": ">= 15.3.0 < 19",
7304
+ "react-dom": ">= 15.3.0 < 19"
7305
+ }
7306
+ },
7307
  "node_modules/react-tuby": {
7308
  "version": "0.1.24",
7309
  "resolved": "https://registry.npmjs.org/react-tuby/-/react-tuby-0.1.24.tgz",
 
7547
  "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA=="
7548
  },
7549
  "node_modules/semver": {
7550
+ "version": "7.6.1",
7551
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.1.tgz",
7552
+ "integrity": "sha512-f/vbBsu+fOiYt+lmwZV0rVwJScl46HppnOA1ZvIuBWKOTlllpyJ3bfVax76/OrhCH38dyxoDIA8K7uB963IYgA==",
 
 
 
7553
  "bin": {
7554
  "semver": "bin/semver.js"
7555
  },
 
7922
  "integrity": "sha512-NnzSOEKyv4I83qbuKw9ROtJrrT6Z/Xt7I0HiP/e6H6GnpeTDvzwGIGeJ8slai+VwODSHQDooW2CAilJwT9SpRg=="
7923
  },
7924
  "node_modules/styled-components": {
7925
+ "version": "6.1.10",
7926
+ "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-6.1.10.tgz",
7927
+ "integrity": "sha512-4K8IKcn7iOt76riGLjvBhRyNPTkUKTvmnwoRFBOtJLswVvzy2VsoE2KOrfl9FJLQUYbITLJY2wfIZ3tjbkA/Zw==",
7928
  "dependencies": {
7929
+ "@emotion/is-prop-valid": "1.2.2",
7930
  "@emotion/unitless": "0.8.1",
7931
+ "@types/stylis": "4.2.5",
7932
  "css-to-react-native": "3.2.0",
7933
+ "csstype": "3.1.3",
7934
+ "postcss": "8.4.38",
7935
  "shallowequal": "1.1.0",
7936
+ "stylis": "4.3.2",
7937
+ "tslib": "2.6.2"
7938
  },
7939
  "engines": {
7940
  "node": ">= 16"
 
7948
  "react-dom": ">= 16.8.0"
7949
  }
7950
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7951
  "node_modules/styled-jsx": {
7952
  "version": "5.1.1",
7953
  "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.1.1.tgz",
 
7971
  }
7972
  },
7973
  "node_modules/stylis": {
7974
+ "version": "4.3.2",
7975
+ "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.2.tgz",
7976
+ "integrity": "sha512-bhtUjWd/z6ltJiQwg0dUfxEJ+W+jdqQd8TbWLWyeIJHlnsqmGLRFFd8e5mA0AZi/zx90smXRlN66YMTcaSFifg=="
7977
  },
7978
  "node_modules/sucrase": {
7979
  "version": "3.35.0",
 
8808
  "node": ">=0.10.32"
8809
  }
8810
  },
 
 
 
 
 
8811
  "node_modules/yaml": {
8812
  "version": "2.4.2",
8813
  "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.2.tgz",
package.json CHANGED
@@ -84,6 +84,7 @@
84
  "react-circular-progressbar": "^2.1.0",
85
  "react-copy-to-clipboard": "^5.1.0",
86
  "react-dom": "18.2.0",
 
87
  "react-icons": "^4.12.0",
88
  "react-photo-sphere-viewer": "^5.0.2-psv5.7.1",
89
  "react-smooth-scroll-hook": "^1.3.4",
 
84
  "react-circular-progressbar": "^2.1.0",
85
  "react-copy-to-clipboard": "^5.1.0",
86
  "react-dom": "18.2.0",
87
+ "react-hook-consent": "^3.5.3",
88
  "react-icons": "^4.12.0",
89
  "react-photo-sphere-viewer": "^5.0.2-psv5.7.1",
90
  "react-smooth-scroll-hook": "^1.3.4",
src/app/layout.tsx CHANGED
@@ -1,12 +1,11 @@
1
  import type { Metadata } from 'next'
 
2
  import Script from "next/script"
3
  import { Roboto } from 'next/font/google'
 
4
 
5
  import { cn } from '@/lib/utils/cn'
6
 
7
- import './globals.css'
8
- import Head from 'next/head'
9
-
10
  const roboto = Roboto({
11
  weight: ['100', '300', '400', '500', '700', '900'],
12
  style: ['normal', 'italic'],
@@ -37,39 +36,14 @@ export default function RootLayout({
37
  type="image/<generated>"
38
  sizes="<generated>"
39
  />
40
- <Script>{`(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
41
- new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
42
- j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
43
- 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
44
- })(window,document,'script','dataLayer','GTM-5ZGS5FDG');`}</Script>
45
  </Head>
46
  <body className={cn(
47
  `h-full w-full overflow-auto`,
48
  `dark text-neutral-100 bg-neutral-950`,
49
  roboto.className
50
  )}>
51
- <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-5ZGS5FDG"
52
- height="0" width="0" style={{ display: "none", visibility: "hidden" }}></iframe></noscript>
53
  {children}
54
  </body>
55
-
56
- {/*
57
- TODO: use a new tracker
58
-
59
- import Script from "next/script"
60
-
61
- This is the kind of project on which we want custom analytics!
62
- <Script src="https://www.googletagmanager.com/gtag/js?id=GTM-NJ2ZZFBX" />
63
- <Script id="google-analytics">
64
- {`
65
- window.dataLayer = window.dataLayer || [];
66
- function gtag(){dataLayer.push(arguments);}
67
- gtag('js', new Date());
68
-
69
- gtag('config', 'GTM-NJ2ZZFBX');
70
- `}
71
- </Script>
72
- */}
73
  </html>
74
  )
75
  }
 
1
  import type { Metadata } from 'next'
2
+ import Head from 'next/head'
3
  import Script from "next/script"
4
  import { Roboto } from 'next/font/google'
5
+ import './globals.css'
6
 
7
  import { cn } from '@/lib/utils/cn'
8
 
 
 
 
9
  const roboto = Roboto({
10
  weight: ['100', '300', '400', '500', '700', '900'],
11
  style: ['normal', 'italic'],
 
36
  type="image/<generated>"
37
  sizes="<generated>"
38
  />
 
 
 
 
 
39
  </Head>
40
  <body className={cn(
41
  `h-full w-full overflow-auto`,
42
  `dark text-neutral-100 bg-neutral-950`,
43
  roboto.className
44
  )}>
 
 
45
  {children}
46
  </body>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  </html>
48
  )
49
  }
src/app/main.tsx CHANGED
@@ -2,6 +2,8 @@
2
 
3
  import { useEffect } from "react"
4
  import { usePathname, useRouter } from "next/navigation"
 
 
5
 
6
  import { ChannelInfo, MediaInfo } from "@/types/general"
7
  import { getCollectionKey } from "@/lib/business/getCollectionKey"
@@ -193,6 +195,30 @@ export function Main({
193
 
194
  const view = useStore(s => s.view)
195
  return (
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
196
  <TubeLayout>
197
  {view === "home" && <HomeView />}
198
  {view === "public_media_embed" && <PublicMediaEmbedView />}
@@ -211,5 +237,15 @@ export function Main({
211
  {view === "user_account" && <UserAccountView />}
212
  {view === "not_found" && <NotFoundView />}
213
  </TubeLayout>
 
 
 
 
 
 
 
 
 
 
214
  )
215
  }
 
2
 
3
  import { useEffect } from "react"
4
  import { usePathname, useRouter } from "next/navigation"
5
+ import { ConsentBanner, ConsentProvider } from 'react-hook-consent'
6
+ import 'react-hook-consent/dist/styles/style.css'
7
 
8
  import { ChannelInfo, MediaInfo } from "@/types/general"
9
  import { getCollectionKey } from "@/lib/business/getCollectionKey"
 
195
 
196
  const view = useStore(s => s.view)
197
  return (
198
+ <ConsentProvider
199
+ options={{
200
+ services: [
201
+ {
202
+ id: 'gtm',
203
+ name: 'Google Tag Manager (for Google analytics)',
204
+ scripts: [
205
+ { id: 'inline-code', code: `(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
206
+ new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
207
+ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
208
+ 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
209
+ })(window,document,'script','dataLayer','GTM-5ZGS5FDG');` },
210
+ ],
211
+ // cookies: [ { pattern: 'cookie-name' }, { pattern: /regex/ }
212
+ // ],
213
+ // localStorage: ['local-storage-key'],
214
+ // sessionStorage: ['session-storage-key'],
215
+ mandatory: true,
216
+ },
217
+ ],
218
+ // customHash: 'my-custom-hash', // optional, e.g. when changing the options based on language
219
+ theme: 'dark',
220
+ }}
221
+ >
222
  <TubeLayout>
223
  {view === "home" && <HomeView />}
224
  {view === "public_media_embed" && <PublicMediaEmbedView />}
 
237
  {view === "user_account" && <UserAccountView />}
238
  {view === "not_found" && <NotFoundView />}
239
  </TubeLayout>
240
+ <ConsentBanner
241
+ settings={{ hidden: false, label: 'More', modal: { title: 'AiTube Analytics' } }}
242
+ decline={{ hidden: false, label: 'No' }}
243
+ approve={{ label: 'Yes' }}
244
+ >
245
+ <>
246
+ Do you allow AiTube to use cookies and external services? This is used to improve the user experience, by analyzing which features and content are liked the most.
247
+ </>
248
+ </ConsentBanner>
249
+ </ConsentProvider>
250
  )
251
  }