SVG file inside React JSX - reactjs

I have the following:
class IconsHolder extends React.Component {
handleClick (e) {
var current = e.target.getAttribute("data-icon-id");
if(current == 1){
this.props.setSlotA(true);
this.props.setSlotB(false);
this.props.setSlotC(false);
}
else if(current == 2) {
this.props.setSlotA(false);
this.props.setSlotB(true);
this.props.setSlotC(false);
}
else if(current == 3) {
this.props.setSlotA(false);
this.props.setSlotB(false);
this.props.setSlotC(true);
}
}
render () {
var a = this.props.slotA ? "active" : "",
b = this.props.slotB ? "active" : "",
c = this.props.slotC ? "active" : "";
return (
<div className="icons-holder">
<div>
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlnsXlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 1090.8 1542.8" style="enable-background:new 0 0 1090.8 1542.8;" xmlSpace="preserve">
<path class="st0" d="M764.9,559c0,0,28.2-35.6,40.2-68.3"/>
<g>
<path d="M430.4,233.8c4.5,0,18.7,2.7,31.7,6.1c13.8,3.6,46.1,8.9,78.5,8.9c31.1,0,57.9-1.2,70-3.1c6.5-1,13.7-2.7,18.9-3.9
c2.5-0.6,5.3-1.2,6.6-1.5c1.2,0.7,3.6,2.6,4.6,3.5c0.8,0.6,1.4,1.2,2,1.6c1.8,1.4,4,1.8,6.3,2.3c1.9,0.4,4.1,0.9,6.2,1.9
c1.8,0.9,5.2,3.8,8.3,6.3c4.4,3.7,9,7.5,12.9,9.3c2.3,1.1,4.9,2.8,7.7,4.6c3.8,2.5,7.7,5.1,11.7,6.5c2.5,0.9,5.8,1.9,9.3,3
c5.2,1.6,11.2,3.5,14.9,5.1c2.6,1.1,11.7,6.2,20.6,11.1c12.8,7.1,26,14.5,31.5,16.7c3.7,1.5,9.8,3.7,16.2,6
c7.5,2.7,18.8,6.8,20.8,7.9c0,0,0,0,0,0c0.2,0.8,0.6,2.2,1.8,3.4c0.7,0.7,1.5,1.2,5,3.4c5.1,3.2,13.8,8.6,22,15
c12.6,9.8,33.5,30.4,40.1,43.8c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6,0-2.3,0c-9.9,0-19.6-1.7-32.9-4c-2.2-0.4-4.4-0.8-6.8-1.2c-6.1-1-13-1.8-19.7-2.5c-7-0.7-17-1.8-21.3-3.1
c0.9-2.9,1.9-5.4,3.4-9c0.3-0.6,0.6-1.3,0.9-2.1c1.7-4,2.2-7.4,2.6-10.1c0.3-1.8,0.5-3.3,1-4.6l0.2-0.7c1.9-5.4,7-19.8,8-32.1
c2-24.9,5.8-46.4,10.8-62.1l0,0l0,0c0.1-0.4,10.9-35.5,20.7-48.7c10.9-14.5,27.9-34.5,41.3-46.5c13.8-12.3,20.4-17.5,29.8-22
c4.1-2,8.9-3.7,13.5-5.4c6.4-2.4,13-4.8,18.6-8c5.3-3,24.8-13.8,43.7-24.2c13.9-7.6,27-14.9,34.5-19.1c3.1-1.7,6-3.3,8.7-4.8
c17.7-9.8,23.9-13.3,26-16.2c1.2-1.8,1.7-3.4,2-4.5c0.1-0.2,0.1-0.5,0.2-0.6c0.5-0.3,1.2-0.5,2.1-0.8c2.1-0.6,4.9-1.5,7.8-4.4
c1.8-1.8,6.1-6.1,9-6.3C430.2,233.8,430.3,233.8,430.4,233.8 M430.4,228.8c-0.2,0-0.4,0-0.6,0c-4.5,0.2-9,4.5-12.2,7.8
s-6.2,2.8-9,4.5s-1.8,4-3.5,6.5s-15,9.5-33,19.5s-69,38-78.2,43.2s-21.8,8.5-31.8,13.2c-10,4.8-17,10.2-31,22.8s-31.5,33.2-42,47.2
s-21.5,50.2-21.5,50.2c-7.2,22.8-10,51-11,63.3s-6.5,27.2-8,31.5s-1,8.5-3.5,14.5s-3.9,9.1-5.2,14.4c-1.3,5.3,27.2,5.8,45.8,9
c17.5,3,28.5,5.2,40.5,5.2c0.8,0,1.6,0,2.5,0c0.4,0,0.8,0,1.1,0c12.6,0,25.3,5.3,35.9,8.3c4,1.2,7.3,1.5,9.8,1.5
c4.4,0,6.7-1.1,6.7-1.1c3.8-0.8,2.9-3.8,2.9-3.8s0.3-7.5,1.2-11.2c0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.8,5.1,2.4,7.9
c-0.3,2.3,1.2,2.5,2.2,2.5c0.2,0,0.3,0,0.4,0c0.8,0,23-7.4,39.9-11.1c16.9-3.8,71.5-3,79.5-3.5c7.4-0.5,15.5-1.8,18.6-1.8
c0.3,0,0.5,0,0.7,0c2.1,0.2,4.9,2.1,6.2,2.1c0.1,0,0.3,0,0.4-0.1c1.1-0.5-0.1-3.2-0.1-3.2s-1.2-4.5-4-13.5s-9-34.8-10.8-49
s-5.2-51.8-9-69.8s-12.8-35.2-20-50s-29.2-36-41.5-45.5s-25.5-17-26.5-18s0.2-2-2.5-4s-28.8-10.8-38-14.5s-45.5-25-52-27.8
s-18.2-6-24.5-8.2s-13-8.2-19-11s-16-13-21-15.5s-9.8-2.2-11.8-3.8s-7-6.2-9.2-6.2s-15.5,3.8-26.8,5.5s-37.2,3-69.2,3
s-63.8-5.2-77.2-8.8C450.3,231.7,435.5,228.8,430.4,228.8L430.4,228.8z"/>
</g>
<path class="st1" d="M420.4,247c0,0,47,14,107.7,14s78.7-2,129.7-13"/>
<path class="st0" d="M157.3,546c0,0,115.3,23.3,131.3,24.3"/>
<path class="st0" d="M297.4,564.8c0,0-26.9-16.5-54.3-37"/>
<path class="st0" d="M298.4,564.9c0,0-18.5-11.4-38.6-48.7"/>
<path class="st2" d="M298.4,564.9c0,0-36.9-69.9-32.2-120.3c4.7-50.3,3.2-56.7-12.8-113.3"/>
<path class="st2" d="M813.3,328.8c-22.9,71.7-13.8,55.8-19.8,127.8S764.9,559,764.9,559"/>
<path class="st0" d="M770.4,562.5c0,0,21.8-22.3,43.6-47.5"/>
<path class="st0" d="M770.4,562.5c0,0,15.7-18.3,49.2-31"/>
<path class="st0" d="M908.1,551.3c0,0-76.8-0.2-129.2,20.2"/>
<path class="st2" d="M294.1,1180.3c0,0,3.3,12,24.3,12.7c21,0.7,69.7-8,93.3-8s71.3,5,136.3,4.7s84.3-6.7,122.7-5.3
c38.3,1.3,73.7,9.3,88.7,6.7c15-2.7,22.8-7.7,22.8-7.7"/>
<path class="st0" d="M763.8,559.2c-1-1.6,2.8-29.4-4.5-64"/>
<path class="st0" d="M301.6,565.3c0,0-5.8-11.3-0.2-29.3c2.4-7.5,5.6-17.1,8.5-25.8"/>
<path class="st1" d="M284.4,615.3"/>
</svg>
</div>
<div className={a}>
<div
onClick={this.handleClick.bind(this)}
data-icon-id={1}
className={this.props.optionA.name}>
</div>
<p className={this.props.optionA.name}>{this.props.optionA.option_name}</p>
</div>
<div className={b}>
<div
onClick={this.handleClick.bind(this)}
data-icon-id={2}
className={this.props.optionB.name}>
</div>
<p className={this.props.optionB.name}>{this.props.optionB.option_name}</p>
</div>
<div className={c}>
<div
onClick={this.handleClick.bind(this)}
data-icon-id={3}
className={this.props.optionC.name}>
</div>
<p className={this.props.optionC.name}>{this.props.optionC.option_name}</p>
</div>
</div>
);
}
}
when this component gets rendered I get the following error:
invariant.js:44 Uncaught Error: The style prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX. This DOM node was rendered by IconsHolder.
at invariant (invariant.js:44)
at assertValidProps (ReactDOMComponent.js:151)
at ReactDOMComponent.mountComponent (ReactDOMComponent.js:446)
at Object.mountComponent (ReactReconciler.js:46)
at ReactDOMComponent.mountChildren (ReactMultiChild.js:238)
at ReactDOMComponent._createInitialChildren (ReactDOMComponent.js:697)
at ReactDOMComponent.mountComponent (ReactDOMComponent.js:516)
at Object.mountComponent (ReactReconciler.js:46)
at ReactDOMComponent.mountChildren (ReactMultiChild.js:238)
at ReactDOMComponent._createInitialChildren (ReactDOMComponent.js:697)
I have already made some changes on the attributes (like removing : and capitalising the first letter after )

Related

I have variable in state. I want to make it global in whole application

I have variable in state. I want to make it global in whole application
export default class Navbar extends Component {
constructor(props) {
super(props)
this.state = {
data: '',
currToggle:false,
currentCurrency:0
}
}
handleCurrChange = (current) => {
this.setState({currentCurrency:current})
}
render = () => {
return (
<>
<header>
<nav>
<NavLink
to='/all'
className={({ isActive }) => (isActive ? "active-nav-item" : "")}
>all</NavLink>
<NavLink
to="/clothes"
className={({ isActive }) => (isActive ? "active-nav-item" : "")}
>clothes</NavLink>
<NavLink
to="/tech"
className={({ isActive }) => (isActive ? "active-nav-item" : "")}
>Tech</NavLink>
</nav>
<div className="logo">
<svg width="41" height="41" viewBox="0 0 41 41" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_150_359)">
<path d="M34.0222 28.6646C34.0494 28.983 33.8009 29.2566 33.4846 29.2566H7.46924C7.15373 29.2566 6.90553 28.9843 6.93156 28.6665L8.7959 5.91227C8.8191 5.62962 9.05287 5.41211 9.33372 5.41211H31.5426C31.8226 5.41211 32.0561 5.62853 32.0801 5.91036L34.0222 28.6646Z" fill="#1DCF65" />
<path d="M36.0988 34.6014C36.1313 34.9985 35.8211 35.339 35.4268 35.339H5.59438C5.2009 35.339 4.89092 35.0002 4.92208 34.6037L7.06376 7.34718C7.09168 6.9927 7.38426 6.71973 7.73606 6.71973H33.1958C33.5468 6.71973 33.8391 6.99161 33.868 7.34499L36.0988 34.6014Z" fill="url(#paint0_linear_150_359)" />
<path d="M19.9232 26.6953C16.0402 26.6953 12.8813 22.8631 12.8813 18.1528C12.8813 17.9075 13.0782 17.7085 13.3211 17.7085C13.564 17.7085 13.7608 17.9073 13.7608 18.1528C13.7608 22.3732 16.5253 25.8067 19.9234 25.8067C23.3214 25.8067 26.0859 22.3732 26.0859 18.1528C26.0859 17.9075 26.2827 17.7085 26.5257 17.7085C26.7686 17.7085 26.9654 17.9073 26.9654 18.1528C26.9653 22.8631 23.8062 26.6953 19.9232 26.6953Z" fill="white" />
<path d="M24.2581 18.0337C24.1456 18.0337 24.0331 17.9904 23.9471 17.9036C23.7754 17.7301 23.7754 17.4488 23.9471 17.2753L26.226 14.9729C26.3084 14.8897 26.4203 14.8428 26.5369 14.8428C26.6536 14.8428 26.7654 14.8895 26.8479 14.9729L29.1045 17.2529C29.2762 17.4264 29.2762 17.7077 29.1045 17.8812C28.9327 18.0546 28.6543 18.0547 28.4826 17.8812L26.5368 15.9155L24.569 17.9036C24.4831 17.9904 24.3706 18.0337 24.2581 18.0337Z" fill="white" />
</g>
<defs>
<linearGradient id="paint0_linear_150_359" x1="29.8733" y1="31.3337" x2="11.5132" y2="9.9008" gradientUnits="userSpaceOnUse">
<stop stop-color="#52D67A" />
<stop offset="1" stop-color="#5AEE87" />
</linearGradient>
<clipPath id="clip0_150_359">
<rect width="31.16" height="30.176" fill="white" transform="translate(4.91992 5.41211)" />
</clipPath>
</defs>
</svg>
</div>
<div className="right-side">
<div className="currency">
<span id="toggler" onClick={()=>this.setState({currToggle:!this.state.currToggle})}>$</span>
<div className={this.state.currToggle ? "currs hide-curr" : "currs"} >
<span onClick={()=>this.handleCurrChange(0)}>USD $</span>
<span onClick={()=>this.handleCurrChange(1)}>RUB ₽</span>
<span onClick={()=>this.handleCurrChange(2)}>GBP £</span>
<span onClick={()=>this.handleCurrChange(3)}>JPY ¥</span>
<span onClick={()=>this.handleCurrChange(4)}>AUD $</span>
</div>
</div>
<div className="cart">
<svg width="20" height="19" viewBox="0 0 20 19" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M19.5613 3.87359C19.1822 3.41031 18.5924 3.12873 17.9821 3.12873H5.15889L4.75914 1.63901C4.52718 0.773016 3.72769 0.168945 2.80069 0.168945H0.653099C0.295301 0.168945 0 0.450523 0 0.793474C0 1.13562 0.294459 1.418 0.653099 1.418H2.80069C3.11654 1.418 3.39045 1.61936 3.47434 1.92139L6.04306 11.7077C6.27502 12.5737 7.07451 13.1778 8.00152 13.1778H16.4028C17.3289 13.1778 18.1507 12.5737 18.3612 11.7077L19.9405 5.50575C20.0877 4.941 19.9619 4.33693 19.5613 3.87365L19.5613 3.87359ZM18.6566 5.22252L17.0773 11.4245C16.9934 11.7265 16.7195 11.9279 16.4036 11.9279H8.00154C7.68569 11.9279 7.41178 11.7265 7.32789 11.4245L5.49611 4.39756H17.983C18.1936 4.39756 18.4042 4.49824 18.5308 4.65948C18.6567 4.81994 18.7192 5.0213 18.6567 5.22266L18.6566 5.22252Z" fill="#43464E" />
<path d="M8.44437 13.9814C7.2443 13.9814 6.25488 14.9276 6.25488 16.0751C6.25488 17.2226 7.24439 18.1688 8.44437 18.1688C9.64445 18.1696 10.6339 17.2234 10.6339 16.0757C10.6339 14.928 9.64436 13.9812 8.44437 13.9812V13.9814ZM8.44437 16.9011C7.9599 16.9011 7.58071 16.5385 7.58071 16.0752C7.58071 15.6119 7.9599 15.2493 8.44437 15.2493C8.92885 15.2493 9.30804 15.6119 9.30804 16.0752C9.30722 16.5188 8.90748 16.9011 8.44437 16.9011Z" fill="#43464E" />
<path d="M15.6875 13.9814C14.4875 13.9814 13.498 14.9277 13.498 16.0752C13.498 17.2226 14.4876 18.1689 15.6875 18.1689C16.8875 18.1689 17.877 17.2226 17.877 16.0752C17.8565 14.9284 16.8875 13.9814 15.6875 13.9814ZM15.6875 16.9011C15.2031 16.9011 14.8239 16.5385 14.8239 16.0752C14.8239 15.612 15.2031 15.2493 15.6875 15.2493C16.172 15.2493 16.5512 15.612 16.5512 16.0752C16.5512 16.5188 16.1506 16.9011 15.6875 16.9011Z" fill="#43464E" />
</svg>
</div>
</div>
</header>
</>
)
}
}
The formatting is a bit off, but you can use Context. Especially look at the dynamic context and updating context from a component.

How to render svg icons in react

var filled_lock = ' <svg width="30px" height="30px" viewBox="0 0 15 15" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><!-- Generator: Sketch 48.1 (47250) - http://www.bohemiancoding.com/sketch --><title>Locked</title><desc>Created with Sketch.</desc><defs></defs><g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Icon/Locked/Filled/Light"><rect id="Rectangle" fill="#D8D8D8" opacity="0" x="-1" y="-1" width="15" height="15"></rect><g id="Icon/Locked/Filled/Dark" transform="translate(-1.000000, -1.000000)"><rect id="Rectangle" fill="#D8D8D8" opacity="0" x="0" y="0" width="15" height="15"></rect><g transform="translate(3.000000, 1.000000)" fill="#668cb3"><path d="M7.75,5.5 L2.25,5.5 L2.25,3.25 C2.25,1.73365625 3.483875,0.5 5.0005,0.5 C6.51659375,0.5 7.75,1.73365625 7.75,3.25 L7.75,5.5 Z M5.25,9.4685 L5.25,10.5 L4.75,10.5 L4.75,9.4685 C4.3186875,9.35746875 4,8.9659375 4,8.5 C4,7.94771875 4.44771875,7.5 5,7.5 C5.55228125,7.5 6,7.94771875 6,8.5 C6,8.9659375 5.6813125,9.35746875 5.25,9.4685 Z M8.25,5.5 L8.25,3.25 C8.25,1.4553125 6.7949375,0 5.0005,0 C3.2050625,0 1.75,1.4553125 1.75,3.25 L1.75,5.5 L0,5.5 L0,13 L10,13 L10,5.5 L8.25,5.5 Z" id="Fill-1"></path><path d="M5,8 C4.7243125,8 4.5,8.2243125 4.5,8.5 C4.5,8.7756875 4.7243125,9 5,9 C5.2756875,9 5.5,8.7756875 5.5,8.5 C5.5,8.2243125 5.2756875,8 5,8" id="Fill-3"></path></g></g></g></g></svg> ';
This var filled_lock is my svg icon which Im trying to render in a div but it's not showing it up
I tried putting it in <img src={filled_lock} /> still it doesn't show up
I tried <div dangerouslySetInnerHTML={{__html:{filled_lock}}} /> still no success
Does anyone know how we can render it in react
So investigating it further I saw that using quotes in the filled_lock was showing the string itself. On removing the string it was failing due to this reason. Which when I fixed gave me the desired output
New code
var filled_lock = <svg width="30px" height="30px" viewBox="0 0 15 15" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlnsXlink="http://www.w3.org/1999/xlink"><!-- Generator: Sketch 48.1 (47250) - http://www.bohemiancoding.com/sketch --><title>Locked</title><desc>Created with Sketch.</desc><defs></defs><g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Icon/Locked/Filled/Light"><rect id="Rectangle" fill="#D8D8D8" opacity="0" x="-1" y="-1" width="15" height="15"></rect><g id="Icon/Locked/Filled/Dark" transform="translate(-1.000000, -1.000000)"><rect id="Rectangle" fill="#D8D8D8" opacity="0" x="0" y="0" width="15" height="15"></rect><g transform="translate(3.000000, 1.000000)" fill="#668cb3"><path d="M7.75,5.5 L2.25,5.5 L2.25,3.25 C2.25,1.73365625 3.483875,0.5 5.0005,0.5 C6.51659375,0.5 7.75,1.73365625 7.75,3.25 L7.75,5.5 Z M5.25,9.4685 L5.25,10.5 L4.75,10.5 L4.75,9.4685 C4.3186875,9.35746875 4,8.9659375 4,8.5 C4,7.94771875 4.44771875,7.5 5,7.5 C5.55228125,7.5 6,7.94771875 6,8.5 C6,8.9659375 5.6813125,9.35746875 5.25,9.4685 Z M8.25,5.5 L8.25,3.25 C8.25,1.4553125 6.7949375,0 5.0005,0 C3.2050625,0 1.75,1.4553125 1.75,3.25 L1.75,5.5 L0,5.5 L0,13 L10,13 L10,5.5 L8.25,5.5 Z" id="Fill-1"></path><path d="M5,8 C4.7243125,8 4.5,8.2243125 4.5,8.5 C4.5,8.7756875 4.7243125,9 5,9 C5.2756875,9 5.5,8.7756875 5.5,8.5 C5.5,8.2243125 5.2756875,8 5,8" id="Fill-3"></path></g></g></g></g></svg>;
For output:
<div>{filled_lock}</div>
Use react-svg for this:
import { ReactSVG } from 'react-svg';
<ReactSVG src={filled_lock} />
You can save svg image in an *.svg file and import it as:
import filled_lock from './filled_lock.svg';
function App() {
return (
<img src={filled_lock} alt="filled_lock" />
);
}
Or
import { ReactComponent as FilledLock } from './filled_lock.svg';
function App() {
return (
<FilledLock />
);
}
Docs

How can i get session data through .net core on react component

I have set the session in the controller and now I want get that
session info in the react page i-e layout component.
This is my login action on controller.
public IActionResult Login(LoginModel loginModel)
{
if (_loginRepository.Login(loginModel.Email, loginModel.Password) == true)
{
var user = _context.AgencyAdminUser.FirstOrDefault(x => x.Email == loginModel.Email);
var key = Encoding.ASCII.GetBytes("YourKey-2374-OFFKDI940NG7:56753253-tyuw-5769-0921-kfirox29zoxv");
//Generate Token for user - JRozario
var JWToken = new JwtSecurityToken(
issuer: "http://localhost:45092/",
audience: "http://localhost:45092/",
claims: GetUserClaims(user),
notBefore: new DateTimeOffset(DateTime.Now).DateTime,
expires: new DateTimeOffset(DateTime.Now.AddDays(1)).DateTime,
//Using HS256 Algorithm to encrypt Token - JRozario
signingCredentials: new SigningCredentials(new SymmetricSecurityKey(key), SecurityAlgorithms.HmacSha256Signature)
);
var token = new JwtSecurityTokenHandler().WriteToken(JWToken);
if (token != null)
{
//Save token in session object
HttpContext.Session.SetString("JWToken", token);
}
return RedirectToAction("Index", "Home");
}
else
{
ViewBag.Message = "Enter Valid Email Address!";
return View();
}
}
and this is the my layout react component
import * as React from 'react';
import { NavMenu } from './NavMenu';
export interface LayoutProps {
children?: React.ReactNode;
}
export class Layout extends React.Component<LayoutProps, {}> {
public render() {
return <div className='kt-quick-panel--right kt-demo-panel--right kt-offcanvas-panel--right kt-header--fixed kt-header-mobile--fixed kt-subheader--fixed kt-subheader--enabled kt-subheader--solid kt-aside--enabled kt-aside--fixed kt-page--loading'>
<div className='d-grid kt-grid--hor kt-grid--root'>
<div className='kt-grid__item kt-grid__item--fluid kt-grid kt-grid--ver kt-page'>
<NavMenu />
</div>
<div className="kt-grid__item kt-grid__item--fluid kt-grid kt-grid--hor kt-wrapper" id="kt_wrapper">
<div id="kt_header" className="kt-header kt-grid__item kt-header--fixed ">
<button className="kt-header-menu-wrapper-close" id="kt_header_menu_mobile_close_btn"><i className="la la-close"></i></button>
<div className="kt-header-menu-wrapper" id="kt_header_menu_wrapper">
<div id="kt_header_menu" className="kt-header-menu kt-header-menu-mobile kt-header-menu--layout-default ">
<ul className="kt-menu__nav ">
<li className="kt-menu__item kt-menu__item--open kt-menu__item--here kt-menu__item--submenu kt-menu__item--rel kt-menu__item--open kt-menu__item--here kt-menu__item--active" data-ktmenu-submenu-toggle="click" aria-haspopup="true"><span className="kt-menu__link-text">Pages</span><i className="kt-menu__ver-arrow la la-angle-right"></i>
<div className="kt-menu__submenu kt-menu__submenu--classic kt-menu__submenu--left">
<ul className="kt-menu__subnav">
<li className="kt-menu__item kt-menu__item--active " aria-haspopup="true"><a href="index.html" className="kt-menu__link "><span className="kt-menu__link-icon"><svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 24" version="1.1" className="kt-svg-icon">
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<rect id="bound" x="0" y="0" width="24" height="24" />
<path d="M5.84026576,8 L18.1597342,8 C19.1999115,8 20.0664437,8.79732479 20.1528258,9.83390904 L20.8194924,17.833909 C20.9112219,18.9346631 20.0932459,19.901362 18.9924919,19.9930915 C18.9372479,19.9976952 18.8818364,20 18.8264009,20 L5.1735991,20 C4.0690296,20 3.1735991,19.1045695 3.1735991,18 C3.1735991,17.9445645 3.17590391,17.889153 3.18050758,17.833909 L3.84717425,9.83390904 C3.93355627,8.79732479 4.80008849,8 5.84026576,8 Z M10.5,10 C10.2238576,10 10,10.2238576 10,10.5 L10,11.5 C10,11.7761424 10.2238576,12 10.5,12 L13.5,12 C13.7761424,12 14,11.7761424 14,11.5 L14,10.5 C14,10.2238576 13.7761424,10 13.5,10 L10.5,10 Z" id="Combined-Shape" fill="#000000" />
<path d="M10,8 L8,8 L8,7 C8,5.34314575 9.34314575,4 11,4 L13,4 C14.6568542,4 16,5.34314575 16,7 L16,8 L14,8 L14,7 C14,6.44771525 13.5522847,6 13,6 L11,6 C10.4477153,6 10,6.44771525 10,7 L10,8 Z" id="Path-53" fill="#000000" fill-rule="nonzero" opacity="0.3" />
</g>
</svg></span><span className="kt-menu__link-text">My Account</span></a></li>
<li className="kt-menu__item " aria-haspopup="true"><a href="javascript:;" className="kt-menu__link "><span className="kt-menu__link-icon"><svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 24" version="1.1" className="kt-svg-icon">
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<rect id="bound" x="0" y="0" width="24" height="24" />
<path d="M2.56066017,10.6819805 L4.68198052,8.56066017 C5.26776695,7.97487373 6.21751442,7.97487373 6.80330086,8.56066017 L8.9246212,10.6819805 C9.51040764,11.267767 9.51040764,12.2175144 8.9246212,12.8033009 L6.80330086,14.9246212 C6.21751442,15.5104076 5.26776695,15.5104076 4.68198052,14.9246212 L2.56066017,12.8033009 C1.97487373,12.2175144 1.97487373,11.267767 2.56066017,10.6819805 Z M14.5606602,10.6819805 L16.6819805,8.56066017 C17.267767,7.97487373 18.2175144,7.97487373 18.8033009,8.56066017 L20.9246212,10.6819805 C21.5104076,11.267767 21.5104076,12.2175144 20.9246212,12.8033009 L18.8033009,14.9246212 C18.2175144,15.5104076 17.267767,15.5104076 16.6819805,14.9246212 L14.5606602,12.8033009 C13.9748737,12.2175144 13.9748737,11.267767 14.5606602,10.6819805 Z" id="Combined-Shape" fill="#000000" opacity="0.3" />
<path d="M8.56066017,16.6819805 L10.6819805,14.5606602 C11.267767,13.9748737 12.2175144,13.9748737 12.8033009,14.5606602 L14.9246212,16.6819805 C15.5104076,17.267767 15.5104076,18.2175144 14.9246212,18.8033009 L12.8033009,20.9246212 C12.2175144,21.5104076 11.267767,21.5104076 10.6819805,20.9246212 L8.56066017,18.8033009 C7.97487373,18.2175144 7.97487373,17.267767 8.56066017,16.6819805 Z M8.56066017,4.68198052 L10.6819805,2.56066017 C11.267767,1.97487373 12.2175144,1.97487373 12.8033009,2.56066017 L14.9246212,4.68198052 C15.5104076,5.26776695 15.5104076,6.21751442 14.9246212,6.80330086 L12.8033009,8.9246212 C12.2175144,9.51040764 11.267767,9.51040764 10.6819805,8.9246212 L8.56066017,6.80330086 C7.97487373,6.21751442 7.97487373,5.26776695 8.56066017,4.68198052 Z" id="Combined-Shape" fill="#000000" />
</g>
</svg></span><span className="kt-menu__link-text">Task Manager</span><span className="kt-menu__link-badge"><span className="kt-badge kt-badge--success">2</span></span></a></li>
<li className="kt-menu__item kt-menu__item--submenu" data-ktmenu-submenu-toggle="hover" aria-haspopup="true"><a href="javascript:;" className="kt-menu__link kt-menu__toggle"><span className="kt-menu__link-icon"><svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 24" version="1.1" className="kt-svg-icon">
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<rect id="bound" x="0" y="0" width="24" height="24" />
<path d="M9,15 L7.5,15 C6.67157288,15 6,15.6715729 6,16.5 C6,17.3284271 6.67157288,18 7.5,18 C8.32842712,18 9,17.3284271 9,16.5 L9,15 Z M9,15 L9,9 L15,9 L15,15 L9,15 Z M15,16.5 C15,17.3284271 15.6715729,18 16.5,18 C17.3284271,18 18,17.3284271 18,16.5 C18,15.6715729 17.3284271,15 16.5,15 L15,15 L15,16.5 Z M16.5,9 C17.3284271,9 18,8.32842712 18,7.5 C18,6.67157288 17.3284271,6 16.5,6 C15.6715729,6 15,6.67157288 15,7.5 L15,9 L16.5,9 Z M9,7.5 C9,6.67157288 8.32842712,6 7.5,6 C6.67157288,6 6,6.67157288 6,7.5 C6,8.32842712 6.67157288,9 7.5,9 L9,9 L9,7.5 Z M11,13 L13,13 L13,11 L11,11 L11,13 Z M13,11 L13,7.5 C13,5.56700338 14.5670034,4 16.5,4 C18.4329966,4 20,5.56700338 20,7.5 C20,9.43299662 18.4329966,11 16.5,11 L13,11 Z M16.5,13 C18.4329966,13 20,14.5670034 20,16.5 C20,18.4329966 18.4329966,20 16.5,20 C14.5670034,20 13,18.4329966 13,16.5 L13,13 L16.5,13 Z M11,16.5 C11,18.4329966 9.43299662,20 7.5,20 C5.56700338,20 4,18.4329966 4,16.5 C4,14.5670034 5.56700338,13 7.5,13 L11,13 L11,16.5 Z M7.5,11 C5.56700338,11 4,9.43299662 4,7.5 C4,5.56700338 5.56700338,4 7.5,4 C9.43299662,4 11,5.56700338 11,7.5 L11,11 L7.5,11 Z" id="Path-2" fill="#000000" fill-rule="nonzero" />
</g>
</svg></span><span className="kt-menu__link-text">Team Manager</span><i className="kt-menu__hor-arrow la la-angle-right"></i><i className="kt-menu__ver-arrow la la-angle-right"></i></a>
<div className="kt-menu__submenu kt-menu__submenu--classic kt-menu__submenu--right">
<ul className="kt-menu__subnav">
<li className="kt-menu__item " aria-haspopup="true"><i className="kt-menu__link-bullet kt-menu__link-bullet--dot"><span></span></i><span className="kt-menu__link-text">Add Team Member</span></li>
<li className="kt-menu__item " aria-haspopup="true"><i className="kt-menu__link-bullet kt-menu__link-bullet--dot"><span></span></i><span className="kt-menu__link-text">Edit Team Member</span></li>
<li className="kt-menu__item " aria-haspopup="true"><i className="kt-menu__link-bullet kt-menu__link-bullet--dot"><span></span></i><span className="kt-menu__link-text">Delete Team Member</span></li>
<li className="kt-menu__item " aria-haspopup="true"><i className="kt-menu__link-bullet kt-menu__link-bullet--dot"><span></span></i><span className="kt-menu__link-text">Team Member Reports</span></li>
<li className="kt-menu__item " aria-haspopup="true"><i className="kt-menu__link-bullet kt-menu__link-bullet--dot"><span></span></i><span className="kt-menu__link-text">Assign Tasks</span></li>
<li className="kt-menu__item " aria-haspopup="true"><i className="kt-menu__link-bullet kt-menu__link-bullet--dot"><span></span></i><span className="kt-menu__link-text">Promote Team Member</span></li>
I want to use FirstName in the component code above which is stored
in the session info;
Reactjs is client side and your .net core code is server side.
Session variables cannot be accessed directly from Reactjs. Better add your required values to a cookie and access them with ReactJs

How to attach onClick events to preview template in react-dropzone-component?

I am trying to use react-dropzone-component in reactjs, Everything works fine but after image is uploaded i want to add the onclick events to preview Template
Below is the config
const djsConfig = { addRemoveLinks: true, params: {
userId: this.props.userId }, previewTemplate:
<div class="dz-preview dz-file-preview" >
<div class="dz-image"><img data-dz-thumbnail /></div>
<div class="dz-details">
<div class="dz-size"><span data-dz-size></span></div>
<div class="dz-filename"><span data-dz-name></span></div>
</div>
<div class="dz-progress"><span class="dz-upload" data-dz-uploadprogress></span></div>
<div class="dz-error-message"><span data-dz-errormessage></span></div>
<div class="dz-success-mark">
<svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<title>Check</title>
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<path d="M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835
11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915
C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022
L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27
C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27
C1,41.3594035 12.6405965,53 27,53 Z" id="Oval-2"
stroke-opacity="0.198794158" stroke="#747474"
fill-opacity="0.816519475" fill="#FFFFFF"
sketch:type="MSShapeGroup"></path>
</g>
</svg>
</div>
<div class="dz-error-mark">
<svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<title>Error</title>
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="Check-+-Oval-2" sketch:type="MSLayerGroup" stroke="#747474"
stroke-opacity="0.198794158" fill="#FFFFFF"
fill-opacity="0.816519475">
<path d="M32.6568542,29 L38.3106978,23.3461564 C39.8771021,21.7797521 39.8758057,19.2483887
38.3137085,17.6862915 C36.7547899,16.1273729 34.2176035,16.1255422 32.6538436,17.6893022 L27,23.3431458 L21.3461564,17.6893022 C19.7823965,16.1255422 17.2452101,16.1273729 15.6862915,17.6862915
C14.1241943,19.2483887 14.1228979,21.7797521 15.6893022,23.3461564
L21.3431458,29 L15.6893022,34.6538436 C14.1228979,36.2202479
14.1241943,38.7516113 15.6862915,40.3137085 C17.2452101,41.8726271 19.7823965,41.8744578 21.3461564,40.3106978 L27,34.6568542 L32.6538436,40.3106978 C34.2176035,41.8744578 36.7547899,41.8726271
38.3137085,40.3137085 C39.8758057,38.7516113 39.8771021,36.2202479 38.3106978,34.6538436 L32.6568542,29 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1
1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z" id="Oval-2"
sketch:type="MSShapeGroup"></path>
</g>
</g>
</svg>
</div>
</div> };
is there any way i can do it?

React inline SVG

I am trying to display some svg thsirt inside a react component like so:
class TShirt extends React.Component {
showText () {
if(this.props.name != '')
{ return 'show-text'; }
}
render () {
return (
<div className="tshirt-wrapper">
<div className="tshirt">
<h1 className={this.showText()}>{this.props.name}
<span className="s">’</span>
<span className={"inline " + (this.props.currentState.hideS ? 'hide': '')}>s</span>
<span className="block">about</span>
</h1>
<div>
<path className="st0" d="M764.9,559c0,0,28.2-35.6,40.2-68.3"/>
<g>
<path className="st1" d="M326.9,1216.5c-1.6,0-3,0-4.1-0.1c-2.9-0.3-5.5-0.3-7.9-0.4c-7.8-0.2-11.6-0.4-14-4.6c-0.6-1.1-1.3-2.2-2-3.3
c-3.7-6.1-6.9-11.3-5.1-19.4c2.2-10,6.4-34.8,9-58.6c0.8-7,1.8-15,2.8-23.4c2.3-18.5,4.9-39.5,5.7-55.4c0.4-8.1,1.1-18,1.8-27.5
c1.3-18.1,2.4-33.8,1.7-38c-0.9-5.8,0-15.8,1.2-22.5c0.5-2.7,1-7.5,1.6-13.6c1.1-9.8,2.5-23.2,4.7-36.9c4.1-26.5,11-73.4,10.4-90.3
c-0.6-16.8-6.3-80.6-9.7-117.1c-1.8-19.8-2.8-36.5-3.5-48.8c-0.4-7.1-0.8-12.7-1.1-16.9c-0.5-5.4-1.6-13.1-2.9-21.2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-8.8c-0.8-4.3,0-9.8-1.3-13.3c-1.3-3.5-4.3-19.2-6.8-39.2
s-10.8-58.8-11.5-71.3c-0.7-12.5-1.8-54.8-4-72c-2.2-17.2-7.2-38.2-8.5-48.3c-1.3-10.2-5.8-38.3-6.8-47c-1-8.7-8.6-74-8.6-74
c-1.7-16.3-0.5-20.2,1-31.9c1.5-11.7,5-47.5,8.5-100.2c3.5-52.7,4-102.1,4.3-108.2c0.4-6.1,0.4-5.9,2.9-9c2.5-3.1,6.2-13,6.8-14.5
s1.4-1.9,3.1-2c0,0,0.1,0,0.1,0c1.8,0,6,3.9,5.8,6.9c-0.2,3,1.9,2.6,5.2,4.4c3.4,1.8-0.1,4.6,1.5,7c1.6,2.4,2.8,5.1,2.4,7.9
c-0.3,2.3,1.2,2.5,2.2,2.5c0.2,0,0.3,0,0.4,0c0.8,0,23-7.4,39.9-11.1c16.9-3.8,71.5-3,79.5-3.5c7.4-0.5,15.5-1.8,18.6-1.8
c0.3,0,0.5,0,0.7,0c2.1,0.2,4.9,2.1,6.2,2.1c0.1,0,0.3,0,0.4-0.1c1.1-0.5-0.1-3.2-0.1-3.2s-1.2-4.5-4-13.5s-9-34.8-10.8-49
s-5.2-51.8-9-69.8s-12.8-35.2-20-50s-29.2-36-41.5-45.5s-25.5-17-26.5-18s0.2-2-2.5-4s-28.8-10.8-38-14.5s-45.5-25-52-27.8
s-18.2-6-24.5-8.2s-13-8.2-19-11s-16-13-21-15.5s-9.8-2.2-11.8-3.8s-7-6.2-9.2-6.2s-15.5,3.8-26.8,5.5s-37.2,3-69.2,3
s-63.8-5.2-77.2-8.8C450.3,231.7,435.5,228.8,430.4,228.8L430.4,228.8z"/>
</g>
<path className="st2" d="M420.4,247c0,0,47,14,107.7,14s78.7-2,129.7-13"/>
<path className="st0" d="M157.3,546c0,0,115.3,23.3,131.3,24.3"/>
<path className="st0" d="M297.4,564.8c0,0-26.9-16.5-54.3-37"/>
<path className="st0" d="M298.4,564.9c0,0-18.5-11.4-38.6-48.7"/>
<path className="st3" d="M298.4,564.9c0,0-36.9-69.9-32.2-120.3c4.7-50.3,3.2-56.7-12.8-113.3"/>
<path className="st3" d="M813.3,328.8c-22.9,71.7-13.8,55.8-19.8,127.8S764.9,559,764.9,559"/>
<path className="st0" d="M770.4,562.5c0,0,21.8-22.3,43.6-47.5"/>
<path className="st0" d="M770.4,562.5c0,0,15.7-18.3,49.2-31"/>
<path className="st0" d="M908.1,551.3c0,0-76.8-0.2-129.2,20.2"/>
<path className="st3" d="M294.1,1180.3c0,0,3.3,12,24.3,12.7c21,0.7,69.7-8,93.3-8s71.3,5,136.3,4.7s84.3-6.7,122.7-5.3
c38.3,1.3,73.7,9.3,88.7,6.7c15-2.7,22.8-7.7,22.8-7.7"/>
<path className="st0" d="M763.8,559.2c-1-1.6,2.8-29.4-4.5-64"/>
<path className="st0" d="M301.6,565.3c0,0-5.8-11.3-0.2-29.3c2.4-7.5,5.6-17.1,8.5-25.8"/>
<path className="st2" d="M284.4,615.3"/>
</div>
{
this.props.iconsHolder ?
<IconsHolder
icons={this.props.icons}
slotA={this.props.slotA}
optionA={this.props.optionA}
slotB={this.props.slotB}
optionB={this.props.optionB}
slotC={this.props.slotC}
optionC={this.props.optionC}
setSlotA={this.props.setSlotA}
setSlotB={this.props.setSlotB}
setSlotC={this.props.setSlotC} />
:
""
}
</div>
</div>
);
}
}
I don't get any errors when running webpack and neither in the console, however the img doesn't appear even though I can see the code in the markup.
If you're going to use SVG elements, you need to do so within an SVG document.
Add <svg> and </svg> around the SVG elements in order to achieve this.

Resources