rm a inside Link

This commit is contained in:
tmshv committed 2023-02-09 16:22:01 +05:00
1 parent 94f2634e56
commit 706c310458
9 files changed
+8 -22

No files matched your search

-2
View File
@@ -20,7 +20,6 @@ export type CardProps = {
export const Card: React.FC<CardProps> = props => ( export const Card: React.FC<CardProps> = props => (
<div className={cx(s.card, layoutClass[props.layout])} style={props.style}> <div className={cx(s.card, layoutClass[props.layout])} style={props.style}>
<Link href={props.href}> <Link href={props.href}>
<a>
<div className={s.image}> <div className={s.image}>
{props.cover} {props.cover}
</div> </div>
@@ -28,7 +27,6 @@ export const Card: React.FC<CardProps> = props => (
<div className={s.body}> <div className={s.body}>
{props.children} {props.children}
</div> </div>
</a>
</Link> </Link>
</div> </div>
) )
+1 -1
View File
@@ -15,7 +15,7 @@ export const Contacts: React.FC = props => {
{contacts.map((x, i) => ( {contacts.map((x, i) => (
<p key={i} className={s.link}> <p key={i} className={s.link}>
<Link href={x.value}> <Link href={x.value}>
<a >{x.title}</a> {x.title}
</Link> </Link>
</p> </p>
))} ))}
+2 -4
View File
@@ -50,16 +50,14 @@ export const FileCard: React.FC<FileCardProps> = props => {
/> />
)} )}
<Link href={props.url}> <Link href={props.url}>
<a>{props.title}</a> {props.title}
</Link> </Link>
</Box> </Box>
</div> </div>
<div className={s.info}> <div className={s.info}>
<Link href={props.file_url}> <Link href={props.file_url} target="_blank" rel="noreferrer">
<a target="_blank" rel="noreferrer">
{format} ({fileSize}) {format} ({fileSize})
</a>
</Link> </Link>
</div> </div>
</div> </div>
+2 -6
View File
@@ -12,20 +12,16 @@ export const File: React.FC<FileProps> = props => (
<div className={s.file} style={props.style}> <div className={s.file} style={props.style}>
{!props.cover?.src ? null : ( {!props.cover?.src ? null : (
<div className={s.image}> <div className={s.image}>
<Link href={props.file.src} > <Link href={props.file.src} target="_blank" rel="noreferrer" className="invisible">
<a target="_blank" rel="noreferrer" className="invisible">
<img src={props.cover.src} alt={props.name} /> <img src={props.cover.src} alt={props.name} />
</a>
</Link> </Link>
</div> </div>
)} )}
<div className={s.info}> <div className={s.info}>
<span>{props.name}</span> <span>{props.name}</span>
<Link href={props.file.src} > <Link href={props.file.src} target={"_blank"} rel={"noreferrer"}>
<a target="_blank" rel="noreferrer">
{ext(props.file.type)} ({size(props.file.size)}) {ext(props.file.type)} ({size(props.file.size)})
</a>
</Link> </Link>
</div> </div>
</div> </div>
+1 -1
View File
@@ -9,7 +9,7 @@ export type ActiveLinkProps = {
export const ActiveLink: React.FC<ActiveLinkProps> = props => props.href export const ActiveLink: React.FC<ActiveLinkProps> = props => props.href
? ( ? (
<Link href={props.href}> <Link href={props.href}>
<a>{props.children}</a> {props.children}
</Link> </Link>
) : ( ) : (
<span style={props.activeStyle}>{props.children}</span> <span style={props.activeStyle}>{props.children}</span>
@@ -17,9 +17,7 @@ export const DesktopNavigation: React.FC<DesktopNavigationProps> = ({ style }) =
return ( return (
<Box wrap gap={"var(--size-s)"} style={style}> <Box wrap gap={"var(--size-s)"} style={style}>
<Link href="/"> <Link href="/">
<a>
<HudozkaLogo dark={dark} /> <HudozkaLogo dark={dark} />
</a>
</Link> </Link>
<Menu <Menu
@@ -48,9 +48,7 @@ export const MobileNavigation: React.FC<MobileNavigationProps> = ({ style }) =>
<Box wrap gap={"var(--size-s)"} style={style}> <Box wrap gap={"var(--size-s)"} style={style}>
<Link href="/"> <Link href="/">
<a>
<HudozkaLogo dark={dark} /> <HudozkaLogo dark={dark} />
</a>
</Link> </Link>
<HudozkaTitle compact /> <HudozkaTitle compact />
<Spacer /> <Spacer />
+1 -1
View File
@@ -11,7 +11,7 @@ export const NotFound: React.FC = () => (
<div> <div>
<Link href={"/"}> <Link href={"/"}>
<a>На главную</a> На главную
</Link> </Link>
</div> </div>
</section> </section>
+1 -3
View File
@@ -39,10 +39,8 @@ export const Button: React.FC<ButtonProps> = ({ size = "default", theme = "defau
if (props.href) { if (props.href) {
return ( return (
<Link href={props.href}> <Link href={props.href} className={className} style={props.style}>
<a className={className} style={props.style}>
{props.children} {props.children}
</a>
</Link> </Link>
) )
} }