mirror of
https://github.com/movie-web/movie-web.git
synced 2025-01-04 07:06:00 +00:00
Add target _blank to button component
This commit is contained in:
parent
faed749691
commit
7731938729
|
@ -47,6 +47,13 @@ export function Button(props: Props) {
|
||||||
history.push(href);
|
history.push(href);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (props.href && props.href.startsWith("https://"))
|
||||||
|
return (
|
||||||
|
<a className={classes} href={props.href} target="_blank" rel="noreferrer">
|
||||||
|
{content}
|
||||||
|
</a>
|
||||||
|
);
|
||||||
|
|
||||||
if (props.href)
|
if (props.href)
|
||||||
return (
|
return (
|
||||||
<a className={classes} onClick={() => goTo(props.href || "")}>
|
<a className={classes} onClick={() => goTo(props.href || "")}>
|
||||||
|
|
Loading…
Reference in a new issue