rm a inside Link
This commit is contained in:
1 parent
94f2634e56
commit
706c310458
9 files changed
+20
-34
No files matched your search
@@ -20,15 +20,13 @@ export type CardProps = {
|
||||
export const Card: React.FC<CardProps> = props => (
|
||||
<div className={cx(s.card, layoutClass[props.layout])} style={props.style}>
|
||||
<Link href={props.href}>
|
||||
<a>
|
||||
<div className={s.image}>
|
||||
{props.cover}
|
||||
</div>
|
||||
<div className={s.image}>
|
||||
{props.cover}
|
||||
</div>
|
||||
|
||||
<div className={s.body}>
|
||||
{props.children}
|
||||
</div>
|
||||
</a>
|
||||
<div className={s.body}>
|
||||
{props.children}
|
||||
</div>
|
||||
</Link>
|
||||
</div>
|
||||
)
|
||||
@@ -15,7 +15,7 @@ export const Contacts: React.FC = props => {
|
||||
{contacts.map((x, i) => (
|
||||
<p key={i} className={s.link}>
|
||||
<Link href={x.value}>
|
||||
<a >{x.title}</a>
|
||||
{x.title}
|
||||
</Link>
|
||||
</p>
|
||||
))}
|
||||
|
||||
@@ -50,16 +50,14 @@ export const FileCard: React.FC<FileCardProps> = props => {
|
||||
/>
|
||||
)}
|
||||
<Link href={props.url}>
|
||||
<a>{props.title}</a>
|
||||
{props.title}
|
||||
</Link>
|
||||
</Box>
|
||||
</div>
|
||||
|
||||
<div className={s.info}>
|
||||
<Link href={props.file_url}>
|
||||
<a target="_blank" rel="noreferrer">
|
||||
{format} ({fileSize})
|
||||
</a>
|
||||
<Link href={props.file_url} target="_blank" rel="noreferrer">
|
||||
{format} ({fileSize})
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -12,20 +12,16 @@ export const File: React.FC<FileProps> = props => (
|
||||
<div className={s.file} style={props.style}>
|
||||
{!props.cover?.src ? null : (
|
||||
<div className={s.image}>
|
||||
<Link href={props.file.src} >
|
||||
<a target="_blank" rel="noreferrer" className="invisible">
|
||||
<img src={props.cover.src} alt={props.name} />
|
||||
</a>
|
||||
<Link href={props.file.src} target="_blank" rel="noreferrer" className="invisible">
|
||||
<img src={props.cover.src} alt={props.name} />
|
||||
</Link>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className={s.info}>
|
||||
<span>{props.name}</span>
|
||||
<Link href={props.file.src} >
|
||||
<a target="_blank" rel="noreferrer">
|
||||
{ext(props.file.type)} ({size(props.file.size)})
|
||||
</a>
|
||||
<Link href={props.file.src} target={"_blank"} rel={"noreferrer"}>
|
||||
{ext(props.file.type)} ({size(props.file.size)})
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -9,7 +9,7 @@ export type ActiveLinkProps = {
|
||||
export const ActiveLink: React.FC<ActiveLinkProps> = props => props.href
|
||||
? (
|
||||
<Link href={props.href}>
|
||||
<a>{props.children}</a>
|
||||
{props.children}
|
||||
</Link>
|
||||
) : (
|
||||
<span style={props.activeStyle}>{props.children}</span>
|
||||
|
||||
@@ -17,9 +17,7 @@ export const DesktopNavigation: React.FC<DesktopNavigationProps> = ({ style }) =
|
||||
return (
|
||||
<Box wrap gap={"var(--size-s)"} style={style}>
|
||||
<Link href="/">
|
||||
<a>
|
||||
<HudozkaLogo dark={dark} />
|
||||
</a>
|
||||
<HudozkaLogo dark={dark} />
|
||||
</Link>
|
||||
|
||||
<Menu
|
||||
|
||||
@@ -48,9 +48,7 @@ export const MobileNavigation: React.FC<MobileNavigationProps> = ({ style }) =>
|
||||
|
||||
<Box wrap gap={"var(--size-s)"} style={style}>
|
||||
<Link href="/">
|
||||
<a>
|
||||
<HudozkaLogo dark={dark} />
|
||||
</a>
|
||||
<HudozkaLogo dark={dark} />
|
||||
</Link>
|
||||
<HudozkaTitle compact />
|
||||
<Spacer />
|
||||
|
||||
@@ -11,7 +11,7 @@ export const NotFound: React.FC = () => (
|
||||
|
||||
<div>
|
||||
<Link href={"/"}>
|
||||
<a>На главную</a>
|
||||
На главную
|
||||
</Link>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -39,10 +39,8 @@ export const Button: React.FC<ButtonProps> = ({ size = "default", theme = "defau
|
||||
|
||||
if (props.href) {
|
||||
return (
|
||||
<Link href={props.href}>
|
||||
<a className={className} style={props.style}>
|
||||
{props.children}
|
||||
</a>
|
||||
<Link href={props.href} className={className} style={props.style}>
|
||||
{props.children}
|
||||
</Link>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user