Skip to content

Commit

Permalink
Merge pull request #447 from ericsanner/bug/cdp-disabled-checks
Browse files Browse the repository at this point in the history
Check CDP Configuration
  • Loading branch information
lovesitecore authored Apr 4, 2024
2 parents c991933 + 2623a06 commit 93cfdb2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Project/Sugcon2024/Sugcon/src/components/CdpPageView.tsx
Original file line number Diff line number Diff line change
@@ -55,7 +55,12 @@ const CdpPageView = (): JSX.Element => {
* By default it is disabled in development mode
*/
const disabled = () => {
return process.env.NODE_ENV === 'development';
return (
!process.env.NEXT_PUBLIC_CDP_CLIENT_KEY ||
!process.env.NEXT_PUBLIC_CDP_TARGET_URL ||
!process.env.NEXT_PUBLIC_PERSONALIZE_SCOPE ||
process.env.NODE_ENV === 'development'
);
};

useEffect(() => {

0 comments on commit 93cfdb2

Please sign in to comment.