Skip to content

Commit

Permalink
Fix sandbox. (#1117)
Browse files Browse the repository at this point in the history
  • Loading branch information
dompuiu authored May 17, 2024
1 parent ec00b7b commit c44e4cf
Show file tree
Hide file tree
Showing 27 changed files with 83 additions and 84 deletions.
42 changes: 21 additions & 21 deletions sandbox/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,28 @@ OF ANY KIND, either express or implied. See the License for the specific languag
governing permissions and limitations under the License.
*/

import React from "react.js";
import { BrowserRouter as Router, Route, Link } from "react-router-dom.js";
import React from "react";
import { BrowserRouter as Router, Route, Link } from "react-router-dom";

import Home from "./Home.js";
import Consent from "./Consent.js";
import Personalization from "./Personalization.js";
import PersonalizationSpa from "./PersonalizationSpa.js";
import PersonalizationAjo from "./PersonalizationAjo.js";
import PersonalizationProfile from "./PersonalizationProfile.js";
import Links from "./Links.js";
import EventMerge from "./EventMerge.js";
import LargePayload from "./LargePayload.js";
import OrgTwo from "./OrgTwo.js";
import DualTag from "./DualTag.js";
import RedirectOffers from "./RedirectOffers.js";
import RedirectedNewPage from "./RedirectedNewPage.js";
import PersonalizationAnalyticsClientSide from "./PersonalizationAnalyticsClientSide.js";
import PersonalizationFormBased from "./PersonalizationFormBased.js";
import Identity from "./Identity.js";
import AlloyVersion from "./components/AlloyVersion.js";
import ConfigOverrides from "./ConfigOverrides.jsx.js";
import InAppMessages from "./components/InAppMessagesDemo/InAppMessages.js";
import Home from "./Home";
import Consent from "./Consent";
import Personalization from "./Personalization";
import PersonalizationSpa from "./PersonalizationSpa";
import PersonalizationAjo from "./PersonalizationAjo";
import PersonalizationProfile from "./PersonalizationProfile";
import Links from "./Links";
import EventMerge from "./EventMerge";
import LargePayload from "./LargePayload";
import OrgTwo from "./OrgTwo";
import DualTag from "./DualTag";
import RedirectOffers from "./RedirectOffers";
import RedirectedNewPage from "./RedirectedNewPage";
import PersonalizationAnalyticsClientSide from "./PersonalizationAnalyticsClientSide";
import PersonalizationFormBased from "./PersonalizationFormBased";
import Identity from "./Identity";
import AlloyVersion from "./components/AlloyVersion";
import ConfigOverrides from "./ConfigOverrides.jsx";
import InAppMessages from "./components/InAppMessagesDemo/InAppMessages";

const BasicExample = () => {
return (
Expand Down
2 changes: 1 addition & 1 deletion sandbox/src/ConfigOverrides.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable no-console */

import React, { useState } from "react.js";
import React, { useState } from "react";

const defaultOverrides = {
datastreamId: "",
Expand Down
10 changes: 5 additions & 5 deletions sandbox/src/Consent.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from "react.js";
import ContentSecurityPolicy from "./components/ContentSecurityPolicy.js";
import useSendPageViewEvent from "./useSendPageViewEvent.js";
import React from "react";
import ContentSecurityPolicy from "./components/ContentSecurityPolicy";
import useSendPageViewEvent from "./useSendPageViewEvent";
import "./Consent.css";
import Configuration from "./components/Configuration.js";
import Cookies from "./components/Cookies.js";
import Configuration from "./components/Configuration";
import Cookies from "./components/Cookies";

const IAB_OPT_IN =
"CO1Z4yuO1Z4yuAcABBENArCsAP_AAH_AACiQGCNX_T5eb2vj-3Zdt_tkaYwf55y3o-wzhhaIse8NwIeH7BoGP2MwvBX4JiQCGBAkkiKBAQdtHGhcCQABgIhRiTKMYk2MjzNKJLJAilsbe0NYCD9mnsHT3ZCY70--u__7P3fAwQgkwVLwCRIWwgJJs0ohTABCOICpBwCUEIQEClhoACAnYFAR6gAAAIDAACAAAAEEEBAIABAAAkIgAAAEBAKACIBAACAEaAhAARIEAsAJEgCAAVA0JACKIIQBCDgwCjlACAoAAAAA.YAAAAAAAAAAA";
Expand Down
6 changes: 3 additions & 3 deletions sandbox/src/DualTag.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react.js";
import UnsafeContentSecurityPolicy from "./components/UnsafeContentSecurityPolicy.js";
import useSendPageViewEvent from "./useSendPageViewEvent.js";
import React from "react";
import UnsafeContentSecurityPolicy from "./components/UnsafeContentSecurityPolicy";
import useSendPageViewEvent from "./useSendPageViewEvent";

const loadLaunch = () => {
const script = document.createElement("script");
Expand Down
6 changes: 3 additions & 3 deletions sandbox/src/EventMerge.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* eslint-disable no-console */

import React, { useRef, useEffect } from "react.js";
import ContentSecurityPolicy from "./components/ContentSecurityPolicy.js";
import useSendPageViewEvent from "./useSendPageViewEvent.js";
import React, { useRef, useEffect } from "react";
import ContentSecurityPolicy from "./components/ContentSecurityPolicy";
import useSendPageViewEvent from "./useSendPageViewEvent";

export default function EventMerge() {
useSendPageViewEvent();
Expand Down
6 changes: 3 additions & 3 deletions sandbox/src/Home.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* eslint-disable no-console, func-names */

import React from "react.js";
import ContentSecurityPolicy from "./components/ContentSecurityPolicy.js";
import useSendPageViewEvent from "./useSendPageViewEvent.js";
import React from "react";
import ContentSecurityPolicy from "./components/ContentSecurityPolicy";
import useSendPageViewEvent from "./useSendPageViewEvent";

const getIdentity = () => {
window.alloy("getIdentity", { namespaces: ["ECID"] }).then(function (result) {
Expand Down
2 changes: 1 addition & 1 deletion sandbox/src/Identity.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

/* eslint-disable no-console, func-names */

import React, { useEffect, useState } from "react.js";
import React, { useEffect, useState } from "react";

const readCookies = () => {
const cookies = {};
Expand Down
6 changes: 3 additions & 3 deletions sandbox/src/LargePayload.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react.js";
import ContentSecurityPolicy from "./components/ContentSecurityPolicy.js";
import useSendPageViewEvent from "./useSendPageViewEvent.js";
import React from "react";
import ContentSecurityPolicy from "./components/ContentSecurityPolicy";
import useSendPageViewEvent from "./useSendPageViewEvent";

const makePayload =
(size, times = 1) =>
Expand Down
6 changes: 3 additions & 3 deletions sandbox/src/Links.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react.js";
import ContentSecurityPolicy from "./components/ContentSecurityPolicy.js";
import useSendPageViewEvent from "./useSendPageViewEvent.js";
import React from "react";
import ContentSecurityPolicy from "./components/ContentSecurityPolicy";
import useSendPageViewEvent from "./useSendPageViewEvent";

const adobeLink = () => {
window.alloy("sendEvent", {
Expand Down
4 changes: 2 additions & 2 deletions sandbox/src/OrgTwo.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react.js";
import useSendPageViewEvent from "./useSendPageViewEvent.js";
import React from "react";
import useSendPageViewEvent from "./useSendPageViewEvent";

export default function OrgTwo() {
useSendPageViewEvent({ instanceName: "organizationTwo" });
Expand Down
6 changes: 3 additions & 3 deletions sandbox/src/Personalization.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react.js";
import ContentSecurityPolicy from "./components/ContentSecurityPolicy.js";
import useSendPageViewEvent from "./useSendPageViewEvent.js";
import React from "react";
import ContentSecurityPolicy from "./components/ContentSecurityPolicy";
import useSendPageViewEvent from "./useSendPageViewEvent";

export default function Personalization() {
useSendPageViewEvent();
Expand Down
6 changes: 3 additions & 3 deletions sandbox/src/PersonalizationAjo.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react.js";
import ContentSecurityPolicy from "./components/ContentSecurityPolicy.js";
import useSendPageViewEvent from "./useSendPageViewEvent.js";
import React from "react";
import ContentSecurityPolicy from "./components/ContentSecurityPolicy";
import useSendPageViewEvent from "./useSendPageViewEvent";

export default function PersonalizationAjo() {
useSendPageViewEvent({ instanceName: "cjmProd" });
Expand Down
6 changes: 3 additions & 3 deletions sandbox/src/PersonalizationAnalyticsClientSide.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useEffect } from "react.js";
import { Link, Route, Switch, useRouteMatch } from "react-router-dom.js";
import ContentSecurityPolicy from "./components/ContentSecurityPolicy.js";
import React, { useEffect } from "react";
import { Link, Route, Switch, useRouteMatch } from "react-router-dom";
import ContentSecurityPolicy from "./components/ContentSecurityPolicy";
import {
getFormBasedOffer,
personalizationEvent,
Expand Down
6 changes: 3 additions & 3 deletions sandbox/src/PersonalizationFormBased.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useEffect, useState } from "react.js";
import ContentSecurityPolicy from "./components/ContentSecurityPolicy.js";
import useSendPageViewEvent from "./useSendPageViewEvent.js";
import React, { useEffect, useState } from "react";
import ContentSecurityPolicy from "./components/ContentSecurityPolicy";
import useSendPageViewEvent from "./useSendPageViewEvent";

const SCOPES_FOR_PAGE = ["sandbox-personalization-page2"];

Expand Down
6 changes: 3 additions & 3 deletions sandbox/src/PersonalizationProfile.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react.js";
import ContentSecurityPolicy from "./components/ContentSecurityPolicy.js";
import useSendPageViewEvent from "./useSendPageViewEvent.js";
import React from "react";
import ContentSecurityPolicy from "./components/ContentSecurityPolicy";
import useSendPageViewEvent from "./useSendPageViewEvent";

export default function Personalization() {
useSendPageViewEvent({
Expand Down
8 changes: 4 additions & 4 deletions sandbox/src/PersonalizationSpa.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useEffect, useState } from "react.js";
import { Switch, Route, useRouteMatch, Link } from "react-router-dom.js";
import ContentSecurityPolicy from "./components/ContentSecurityPolicy.js";
import useSendPageViewEvent from "./useSendPageViewEvent.js";
import React, { useEffect, useState } from "react";
import { Switch, Route, useRouteMatch, Link } from "react-router-dom";
import ContentSecurityPolicy from "./components/ContentSecurityPolicy";
import useSendPageViewEvent from "./useSendPageViewEvent";

const usePropositions = ({ viewName }) => {
const [propositions, setPropositions] = useState(undefined);
Expand Down
4 changes: 2 additions & 2 deletions sandbox/src/RedirectOffers.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable no-console */

import React, { useEffect } from "react.js";
import ContentSecurityPolicy from "./components/ContentSecurityPolicy.js";
import React, { useEffect } from "react";
import ContentSecurityPolicy from "./components/ContentSecurityPolicy";

export default function RedirectOffers() {
useEffect(() => {
Expand Down
4 changes: 2 additions & 2 deletions sandbox/src/RedirectedNewPage.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable no-console */

import React, { useEffect } from "react.js";
import ContentSecurityPolicy from "./components/ContentSecurityPolicy.js";
import React, { useEffect } from "react";
import ContentSecurityPolicy from "./components/ContentSecurityPolicy";

export default function RedirectedNewPage() {
useEffect(() => {
Expand Down
2 changes: 1 addition & 1 deletion sandbox/src/components/AlloyVersion.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
*/
import React, { useEffect, useState } from "react.js";
import React, { useEffect, useState } from "react";

const useAlloyVersion = (instanceName = "alloy") => {
const [version, setVersion] = useState("0.0.0");
Expand Down
2 changes: 1 addition & 1 deletion sandbox/src/components/Configuration.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from "react.js";
import React from "react";

const getQueryStringParameter = (key) => {
const searchParams = new URLSearchParams(window.location.search);
Expand Down
4 changes: 2 additions & 2 deletions sandbox/src/components/ContentSecurityPolicy.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ OF ANY KIND, either express or implied. See the License for the specific languag
governing permissions and limitations under the License.
*/

import React from "react.js";
import { Helmet } from "react-helmet.js";
import React from "react";
import { Helmet } from "react-helmet";

export default function ContentSecurityPolicy() {
return (
Expand Down
2 changes: 1 addition & 1 deletion sandbox/src/components/Cookies.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable no-console, func-names */

import React, { useEffect, useState } from "react.js";
import React, { useEffect, useState } from "react";

const KONDUCTOR_COOKIE_PREFIX = "kndctr_5BFE274A5F6980A50A495C08_AdobeOrg_";
const LEGACY_IDENTITY_COOKIE = "AMCV_5BFE274A5F6980A50A495C08%40AdobeOrg";
Expand Down
4 changes: 2 additions & 2 deletions sandbox/src/components/InAppMessagesDemo/InAppMessages.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable no-bitwise, no-console */
import React, { useEffect, useState } from "react.js";
import ContentSecurityPolicy from "../ContentSecurityPolicy.js";
import React, { useEffect, useState } from "react";
import ContentSecurityPolicy from "../ContentSecurityPolicy";
import "./InAppMessagesStyle.css";

const configKey =
Expand Down
4 changes: 2 additions & 2 deletions sandbox/src/components/UnsafeContentSecurityPolicy.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ OF ANY KIND, either express or implied. See the License for the specific languag
governing permissions and limitations under the License.
*/

import React from "react.js";
import { Helmet } from "react-helmet.js";
import React from "react";
import { Helmet } from "react-helmet";

export default function UnsafeContentSecurityPolicy() {
return (
Expand Down
8 changes: 4 additions & 4 deletions sandbox/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ governing permissions and limitations under the License.
*/

import "@babel/polyfill";
import React from "react.js";
import ReactDOM from "react-dom.js";
import App from "./App.js";
import * as serviceWorker from "./serviceWorker.js";
import React from "react";
import ReactDOM from "react-dom";
import App from "./App";
import * as serviceWorker from "./serviceWorker";

ReactDOM.render(<App />, document.getElementById("root"));

Expand Down
2 changes: 1 addition & 1 deletion sandbox/src/personalizationAnalyticsClientSideHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
getDisplayAnalyticsToken,
getECID,
} from "./analyticsTokenHandler";
import { sendAnalyticsPayload } from "./DataInsertionAPI.js";
import { sendAnalyticsPayload } from "./DataInsertionAPI";

// this org is configured to have Analytics disabled thus it is A4T Client Side Logging
const instanceName = "organizationTwo";
Expand Down
3 changes: 1 addition & 2 deletions sandbox/src/useSendPageViewEvent.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag
governing permissions and limitations under the License.
*/

import { useEffect } from "react.js";
import { useEffect } from "react";

const isNonEmptyArray = (value) => Array.isArray(value) && value.length > 0;

Expand All @@ -29,7 +29,6 @@ export default ({
xdm.web = {
webPageDetails: {
viewName,
pageName: viewName,
},
};
}
Expand Down

0 comments on commit c44e4cf

Please sign in to comment.