Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
render() {
const { intl } = this.context;
const { hash, poolName } = this.props;
const avatarSource = jdenticon.toSvg(hash, 36, { padding: 0 });
// Taken from Seiza (dangerouslyEmbedIntoDataURI())
const avatar = `data:image/svg+xml;utf8,${encodeURIComponent(avatarSource)}`;
// const tableData = [
// {
// label: intl.formatMessage(messages.performance),
// value: data.percentage + ' %',
// },
// {
// label: intl.formatMessage(messages.fullness),
// value: data.fullness + ' %',
// },
// {
// label: intl.formatMessage(globalMessages.marginsLabel),
// value: data.margins + ' %',
function addConnection(state, connection) {
const newConnection = Object.assign({}, connection, {
identicon: jdenticon.toSvg(md5(connection.name), 40),
index: state.length || 0
});
return state.concat(newConnection);
}
public render (): React.ReactNode {
const { className, publicKey, size, style } = this.props;
return (
<div style="{style}">
);
}
}</div>
describe('writeConfigFile', () => {
const state = {
connections: [{
authKey: "",
database: "",
host: "192.168.99.100",
identicon: jdenticon.toSvg(md5("rethink-tut"), 40),
index: 0,
name: "rethink-tut",
port: "32769"
}],
main: {
email: 'cassie@codehangar.io',
created: '',
dbConnection: { stuff: 'stuff' },
connection: {
selected: {
name: 'localhost',
host: 'localhost',
port: 1234
}
},
selectedTable: {
router.get('/:hash/:size', (req, res) => {
let
hash = Hash.sha256().update(req.params.hash).digest('hex'),
size = parseInt(req.params.size),
identicon;
if (req.query.format == 'png') {
identicon = jdenticon.toPng(hash, size);
} else {
identicon = jdenticon.toSvg(hash, size);
}
return res.send(identicon);
});
}
const Avatar = ({ value, className, size }) => (
<img data-for="gravatar" data-tip="" src="{`data:image/svg+xml,${encodeURIComponent(jdenticon.toSvg(value," alt="{value}">
<span>Automatically created gravatar. its unique for every profile. You can see your in the upper right corner</span>
)
const AssetIdIcon = ({ value }) => {
const SVG = styled(SVGInline).attrs({
svg: jdenticon.toSvg(value, 50),
})`
width: auto;
`;
return <svg></svg>;
};