Commit e5f8a53b authored by Andy Lamb's avatar Andy Lamb
Browse files

added yammer feed

parent 448b255c
Pipeline #40404 passed with stage
in 5 minutes and 31 seconds
......@@ -17282,6 +17282,12 @@
"prop-types": "^15.6.1"
}
},
"react-inline-script": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/react-inline-script/-/react-inline-script-1.2.0.tgz",
"integrity": "sha512-Idfm2rYZ5KLr6Ti1IICkb8lIC7FMxDZoEJF93egGH+F1rAwWByAjPElcD0Tx2yBk39shYu8Pjo/CF09++yA27g==",
"dev": true
},
"react-input-autosize": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/react-input-autosize/-/react-input-autosize-2.2.2.tgz",
......
import React from 'react';
import PropTypes from 'prop-types';
const YammerFeed = props => {
return (
<div
id="#embeddedFeed"
style={{ height: props.divHeight, width: props.divWidth }}
></div>
);
};
YammerFeed.propTypes = {
divHeight: PropTypes.number,
divWidth: PropTypes.number,
};
export default YammerFeed;
import React from 'react';
import Script from 'react-inline-script';
import PropTypes from 'prop-types';
const YammerScripts = props => {
return (
<>
<Script url="https://s0-azure.assets-yammer.com/assets/platform_embed.js" />
<Script>
{`
yam.connect.embedFeed({
container: "#embedded-feed",
network: "towerhamlets.gov.uk",
feedType: "group",
feedId: "${props.feedId}"
});
`}
</Script>
</>
);
};
YammerScripts.propTypes = {
// container: PropTypes.string,
// network: PropTypes.string,
// feedType: PropTypes.string,
feedId: PropTypes.string,
};
export default YammerScripts;
......@@ -2,11 +2,20 @@ import React from 'react';
import PropTypes from 'prop-types';
import { Link } from 'react-router-dom';
import MainLayout from '~/layouts/Main.layout';
import YammerFeed from '~/features/yammerFeed/YammerFeed';
import YammerScripts from '~/features/yammerScripts/YammerScripts';
const Homepage = ({ entry }) => (
<MainLayout>
<h1>Hello world {entry && entry.entryTitle}</h1>
<YammerFeed divHeight={800} divWidth={400} />
<Link to="/zenInfo">ZenInfo</Link>
<YammerScripts
container={'#embeddedFeed'}
network={'towerhamlets.gov.uk'}
feedType={'group'}
feedId={'20036132864'}
/>
</MainLayout>
);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment