const TextInfoShiftBox: FunctionComponent<TextInfoShiftBoxInterface> = () => {
const [stateArrow, setStateArrow] = useState(false);
const handlerCollapseInfo = (e) => {
e.preventDefault();
setStateArrow(!stateArrow)
};
return (
<AreaContainer>
<div className='info-shift-box'>
<Icon onClick={(e) => handlerCollapseInfo(e)} className='arrow-icon' size='20px' icon={stateArrow ? "be-110" : "be-030"} />
<h3>Info</h3><Icon className='warm-icon' size='24px' icon={"bd-150"} />
</div>
<div>
<b>text</b>
<LinkContainer>
<Link className='ref' text=' acá.' onClick="www.google.com.ar" type='red' />
</ LinkContainer>
<span className='info-shift-box-client'>
other text.
{stateArrow ? ' text' : ''}
</span>
</div>
</ AreaContainer>
)
Asked
Active
Viewed 288 times
0

Anoop Joshi P
- 25,373
- 8
- 32
- 53
-
Does this answer your question? [React-Router External link](https://stackoverflow.com/questions/42914666/react-router-external-link) – Giovanni Esposito Apr 30 '21 at 14:56
1 Answers
1
onClick="www.google.com.ar"
The above is returning a string, if you want the link to go somewhere you need to use the to
method:
<Link className='ref' text=' acá.' to="https://www.google.com.ar" type='red' />

Stu
- 4,160
- 24
- 43