Skip to content

Commit

Permalink
Added Zendesk integration
Browse files Browse the repository at this point in the history
  • Loading branch information
pookmish committed Nov 18, 2024
1 parent a8cef5c commit 3a988af
Show file tree
Hide file tree
Showing 5 changed files with 665 additions and 646 deletions.
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,7 @@ BUILD_PAGES=0
#ALGOLIA_KEY=
#ALGOLIA_RECOMMENDATIONS=true

# Zendesk
#NEXT_PUBLIC_ZENDESK=1245
# Google tag manager.
#NEXT_PUBLIC_GTM=GTM-1234
2 changes: 2 additions & 0 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import clsx from "clsx"
import Editori11y from "@components/tools/editorially"
import localFont from "next/font/local"
import Cookiebot from "@components/elements/cookiebot"
import Zendesk from "@components/elements/zendesk"

const appleIcons: Icon[] = [60, 72, 76, 114, 120, 144, 152, 180].map(size => ({
url: `https://www-media.stanford.edu/assets/favicon/apple-touch-icon-${size}x${size}.png`,
Expand Down Expand Up @@ -53,6 +54,7 @@ const RootLayout = ({children, modal}: {children: React.ReactNode; modal: React.
<Cookiebot />
<UserAnalytics />
<DrupalWindowSync />
<Zendesk />
{isDevMode && <Editori11y />}

<nav aria-label="Skip Links">
Expand Down
49 changes: 25 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,40 +14,41 @@
"postinstall": "git config --local core.hooksPath .githooks/; exit 0"
},
"dependencies": {
"@heroicons/react": "^2.1.5",
"@heroicons/react": "^2.2.0",
"@mui/base": "5.0.0-beta.61",
"@next/third-parties": "15.0.2",
"@next/third-parties": "15.0.3",
"@tailwindcss/container-queries": "^0.1.1",
"@types/node": "^22.8.6",
"@types/node": "^22.9.0",
"@types/react": "^19.0.0-rc.1",
"@types/react-dom": "19.0.0-rc.1",
"algoliasearch": "^5.12.0",
"algoliasearch": "^5.14.2",
"autoprefixer": "^10.4.20",
"clsx": "^2.1.1",
"decanter": "^7.3.0",
"drupal-jsonapi-params": "^2.3.2",
"graphql": "^16.9.0",
"graphql-request": "^7.1.0",
"graphql-request": "^7.1.2",
"graphql-tag": "^2.12.6",
"html-entities": "^2.5.2",
"html-react-parser": "^5.1.18",
"next": "15.0.2",
"postcss": "^8.4.47",
"qs": "^6.13.0",
"next": "15.0.3",
"postcss": "^8.4.49",
"qs": "^6.13.1",
"react": "19.0.0-rc-fb9a90fa48-20240614",
"react-cookiebot": "^1.0.10",
"react-dom": "19.0.0-rc-fb9a90fa48-20240614",
"react-error-boundary": "^4.1.2",
"react-focus-lock": "^2.13.2",
"react-instantsearch": "^7.13.6",
"react-instantsearch-nextjs": "^0.3.16",
"react-instantsearch": "^7.13.8",
"react-instantsearch-nextjs": "^0.3.18",
"react-slick": "^0.30.2",
"react-super-responsive-table": "^6.0.0",
"react-tiny-oembed": "^1.1.0",
"react-youtube": "^10.1.0",
"react-zendesk": "^0.1.13",
"sharp": "^0.33.5",
"tailwind-merge": "^2.5.4",
"tailwindcss": "^3.4.14",
"tailwindcss": "^3.4.15",
"typescript": "^5.6.3",
"usehooks-ts": "^3.1.0"
},
Expand All @@ -57,31 +58,31 @@
"@graphql-codegen/import-types-preset": "^3.0.0",
"@graphql-codegen/typescript-graphql-request": "^6.2.0",
"@graphql-codegen/typescript-operations": "^4.3.1",
"@next/bundle-analyzer": "15.0.2",
"@storybook/addon-essentials": "^8.4.0",
"@storybook/addon-interactions": "^8.4.0",
"@storybook/addon-links": "^8.4.0",
"@next/bundle-analyzer": "15.0.3",
"@storybook/addon-essentials": "^8.4.4",
"@storybook/addon-interactions": "^8.4.4",
"@storybook/addon-links": "^8.4.4",
"@storybook/addon-styling": "^1.3.7",
"@storybook/blocks": "^8.4.0",
"@storybook/nextjs": "^8.4.0",
"@storybook/react": "^8.4.0",
"@storybook/blocks": "^8.4.4",
"@storybook/nextjs": "^8.4.4",
"@storybook/react": "^8.4.4",
"@storybook/testing-library": "^0.2.2",
"@types/react-cookiebot": "^1.0.5",
"@types/react-slick": "^0.23.13",
"concurrently": "^9.0.1",
"concurrently": "^9.1.0",
"encoding": "^0.1.13",
"eslint": "^9.13.0",
"eslint-config-next": "15.0.2",
"eslint-config-next": "15.0.3",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-storybook": "^0.10.1",
"eslint-plugin-storybook": "^0.11.0",
"prettier": "^3.3.3",
"prettier-plugin-tailwindcss": "^0.6.8",
"react-docgen": "^7.1.0",
"storybook": "^8.4.0",
"storybook": "^8.4.4",
"storybook-addon-module-mock": "^1.3.4",
"tsconfig-paths-webpack-plugin": "^4.1.0",
"typescript-eslint": "^8.12.2"
"tsconfig-paths-webpack-plugin": "^4.2.0",
"typescript-eslint": "^8.15.0"
},
"packageManager": "[email protected]",
"resolutions": {
Expand Down
9 changes: 9 additions & 0 deletions src/components/elements/zendesk.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
"use client"

import ReactZendesk from "react-zendesk"

const Zendesk = () => {
if (!process.env.NEXT_PUBLIC_ZENDESK) return
return <ReactZendesk zendeskKey={process.env.NEXT_PUBLIC_ZENDESK} />
}
export default Zendesk
Loading

0 comments on commit 3a988af

Please sign in to comment.