\n \n We just sent a 4-digit code to your mobile phone, please enter it below.\n \n \n {\n verifyPhoneCode({\n variables: {\n phoneNumber,\n phoneCode,\n organizationId: organization._id,\n },\n });\n }}\n />\n \n
\n )}\n \n {error && (\n {error}\n )}\n \n By providing your phone number, you agree to participate in\n the marketing program and to be contacted through this phone\n number as part of the program. This program information is subject\n to Check This Out's \n \n Terms of Use and Privacy Policy\n \n \n >\n )}\n \n >\n \n \n );\n}\n\nexport default Embed;\n","import React, { useMemo, useState, useEffect } from \"react\";\nimport {\n\tBrowserRouter as Router,\n\tSwitch,\n\tRedirect,\n\tRoute,\n} from \"react-router-dom\";\nimport Layout from \"./Layout\";\nimport EmbedLayout from \"./EmbedLayout\";\nimport HomeLayout from \"./HomeLayout\";\nimport Home from \"./Home\";\nimport Invite from \"./Invite\";\nimport PhoneInput from \"./PhoneInput\";\nimport InviteFriends from \"./InviteFriends\";\nimport AcceptCoupon from \"./AcceptCoupon\";\nimport { OrganizationContext } from \"../context/OrganizationContext\";\nimport { AppContext } from \"../context/AppContext\";\nimport OrganizationList from \"./OrganizationList\";\nimport Unsubscribed from \"./Unsubscribed\";\nimport InviteError from \"./InviteError\";\nimport JoinReferral from \"./JoinReferral\";\nimport Discounts from \"./Discounts\";\nimport Embed from \"./Embed\";\n\nexport default function App() {\n\tconst [organization, setOrganization] = useState(null);\n\tconst [app, setApp] = useState(null);\n\tconst appValue = useMemo(() => ({ app, setApp }), [app, setApp]);\n\tconst orgValue = useMemo(\n\t\t() => ({ organization, setOrganization }),\n\t\t[organization, setOrganization],\n\t);\n\tuseEffect(() => {\n\t\t// prevent android keyboard shrinking viewport when\n\t\t// open and affecting percentage based div heights for whole app\n\t\t// https://stackoverflow.com/questions/32963400/android-keyboard-shrinking-the-viewport-and-elements-using-unit-vh-in-css\n\t\t// const viewport = document.querySelector(\"meta[name=viewport]\");\n\t\t// if (viewport) {\n\t\t// viewport.setAttribute(\n\t\t// 'content',\n\t\t// `height=${window.innerHeight}, width=${window.innerWidth}, initial-scale=1.0`,\n\t\t// );\n\t\t// }\n\t}, []);\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t);\n}\n","import { HttpLink } from 'apollo-link-http';\nimport { onError } from 'apollo-link-error';\nimport { ApolloLink } from 'apollo-link';\n\nconst apiHost = process.env.NODE_ENV === 'production' ? '' : 'http://localhost:4444';\n// const apiHost = 'http://192.168.1.4:4444';\n\n// For local mobile development testing, you will have to change a couple things.\n// set apiHost like the example below\n// const apiHost = 'http://localipaddress:4444'; (ex: const apiHost = 'http://192.168.1.4:4444';)\n// then you will have to allow cors to accept your request origin url in server.js like the example below\n// app.use(cors({\n// origin: ['http://localhost:3000', 'http://localhost:3001', 'http://192.168.1.4:3000'],\n// credentials: true,\n// }));\n// Then, on the same wifi network, connect to http://192.168.1.4:3000 on your mobile device\n\n/**\n * getHeaders for genrate dynamic headers\n * Fix for Incongito where localStorage throwing security error in chrome\n */\nconst getHeaders = () => {\n let authorization\n try {\n authorization = localStorage.getItem('CHECK_THIS_OUT_AUTH_TOKEN')\n } catch (error) {\n console.log(error)\n }\n if (authorization) {\n return { headers: { authorization } }\n }\n return { headers: {} }\n}\nexport const authLink = new ApolloLink((operation, forward) => {\n const context = getHeaders()\n operation.setContext(context);\n return forward(operation);\n});\n\nexport const errorLink = onError(({ graphQLErrors, networkError }) => {\n if (graphQLErrors) {\n graphQLErrors.forEach(({ message, locations, path }) => console.log(\n `[GraphQL error]: Message: ${message}, Location: ${locations}, Path: ${path}`,\n ));\n }\n if (networkError) console.log(`[Network error]: ${networkError}`);\n});\n\nexport const httpLink = new HttpLink({\n uri: `${apiHost}/graphql`,\n credentials: 'same-origin',\n});\n\nexport const omitTypeNameLink = new ApolloLink((operation, forward) => {\n if (operation.variables && operation.operationName !== 'uploadFiles') {\n operation.variables = omitDeep(operation.variables, '__typename');\n }\n return forward(operation).map((data) => {\n return data;\n });\n});\n\n// helper functions\nfunction omitDeep(obj, key) {\n const keys = Object.keys(obj);\n const newObj = {};\n keys.forEach((i) => {\n if (i !== key) {\n const val = obj[i];\n if (Array.isArray(val)) newObj[i] = omitDeepArrayWalk(val, key);\n else if (typeof val === 'object' && val !== null) newObj[i] = omitDeep(val, key);\n else newObj[i] = val;\n }\n });\n return newObj;\n}\n\nfunction omitDeepArrayWalk(arr, key) {\n return arr.map((val) => {\n if (Array.isArray(val)) return omitDeepArrayWalk(val, key);\n if (typeof val === 'object') return omitDeep(val, key);\n return val;\n });\n}\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport './styles/index.css';\nimport { ApolloProvider } from '@apollo/react-hooks';\nimport { ApolloClient } from 'apollo-client';\nimport { InMemoryCache } from 'apollo-cache-inmemory';\nimport { from } from 'apollo-link';\nimport App from './components/App';\nimport {\n authLink,\n omitTypeNameLink,\n errorLink,\n httpLink,\n} from './graphql/ApolloLinks';\n\nconst client = new ApolloClient({\n link: from([\n authLink,\n omitTypeNameLink,\n errorLink,\n httpLink,\n ]),\n cache: new InMemoryCache(),\n});\n\nReactDOM.render(\n \n \n ,\n document.getElementById('root'),\n);\n","module.exports = __webpack_public_path__ + \"static/media/cto-full-logo.130e2b98.png\";"],"sourceRoot":""}