Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename-webhook #390

Merged
merged 1 commit into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# reference https://nextjs.org/docs/basic-features/environment-variables#exposing-environment-variables-to-the-browser
# to learn about the NEXT_PUBLIC prefix

# Ref: https://github.com/scientist-softserv/webstore/wiki/Deployment#when-using-a-cname
# when deploying to a custom domain.
NEXT_PUBLIC_APP_BASE_URL=https://store.webstore.com
NEXT_PUBLIC_PROVIDER_ID=0001
NEXT_PUBLIC_PROVIDER_NAME=webstore
Expand Down
3 changes: 2 additions & 1 deletion pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
headerAndFooterLinkColors,
} from '../utils'
import '../utils/theme/globals.scss'
const gtmId = process.env.NEXT_PUBLIC_GOOGLE_TAG_MANAGER_ID

const WebStore = ({ Component }) => {
/**
Expand All @@ -41,7 +42,7 @@ const WebStore = ({ Component }) => {
enableCookies={enableCookies}
getCookieConsent={getCookieConsent()}
/> */}
<GoogleTagManager gtmId={process.env.NEXT_PUBLIC_GOOGLE_TAG_MANAGER_ID} />
{gtmId && <GoogleTagManager gtmId={gtmId} />}
<Header
auth={{
signIn: () => signIn(process.env.NEXT_PUBLIC_PROVIDER_NAME),
Expand Down
2 changes: 1 addition & 1 deletion utils/api/webhooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const getWebhookConfig = async (accessToken) => {
export const createWebhookConfig = (accessToken) => {
/* eslint-disable camelcase */
const webhook_config = {
'name': 'Webstore',
'name': `${process.env.NEXT_PUBLIC_PROVIDER_NAME} DS`,
'url': `${process.env.NEXT_PUBLIC_WEBHOOK_URL}`,
'active': true,
'params': {
Expand Down
Loading