Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const {
appMarkup = '',
appContext,
head,
initialState = {},
scripts,
cssLinks,
} = props;
const localeCode = initialState.config.requestLanguage;
const htmlLang = localeCode.split('-')[0];
/**
* Add polyfill.io script if needed
*/
const polyfill = getPolyfill(appContext.userAgent, localeCode);
const js = polyfill ? [polyfill, ...scripts] : [...scripts];
/**
* `initialState` has untrusted user-generated content that needs to be
* written into the DOM inside a
export const generateOrganizationLdJson = (baseUrl, localeCode, route) => {
const socialLinks = getSocialLinks(localeCode);
const url = generateCanonicalUrl(baseUrl, localeCode, route);
return {
'@type': 'Organization',
'@context': SCHEMA_ORG,
url: url,
name: DEFAULT_TITLE,
logo: MEETUP_SWARM_LOGO_URL,
sameAs: [
socialLinks.facebook,
socialLinks.twitter,
socialLinks.youtube,
socialLinks.googlePlus,
socialLinks.instagram,
],
};
};