Fix nested <a> in GridRep
This commit is contained in:
parent
2eaaf1baae
commit
8f132e7f51
2 changed files with 73 additions and 58 deletions
|
|
@ -6,8 +6,8 @@
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-rows: 1fr 1fr;
|
grid-template-rows: 1fr 1fr;
|
||||||
gap: $unit;
|
gap: $unit;
|
||||||
padding: $unit-2x $unit-2x 0 $unit-2x;
|
|
||||||
min-width: 320px;
|
min-width: 320px;
|
||||||
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
|
|
||||||
|
|
@ -54,6 +54,22 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
display: grid;
|
||||||
|
grid-template-rows: auto 1fr;
|
||||||
|
grid-gap: 8px;
|
||||||
|
gap: 8px;
|
||||||
|
padding: $unit-2x $unit-2x 0 $unit-2x;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
position: absolute;
|
||||||
|
z-index: 2;
|
||||||
|
right: $unit;
|
||||||
|
top: $unit;
|
||||||
|
width: 44px;
|
||||||
|
}
|
||||||
|
|
||||||
.gridContainer {
|
.gridContainer {
|
||||||
aspect-ratio: 2/0.95;
|
aspect-ratio: 2/0.95;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
||||||
|
|
@ -501,7 +501,6 @@ const GridRep = ({ party, loading, onClick, onSave }: Props) => {
|
||||||
)
|
)
|
||||||
|
|
||||||
const favoriteButton = (
|
const favoriteButton = (
|
||||||
<Link href="#">
|
|
||||||
<Button
|
<Button
|
||||||
className={classNames({
|
className={classNames({
|
||||||
save: true,
|
save: true,
|
||||||
|
|
@ -513,7 +512,6 @@ const GridRep = ({ party, loading, onClick, onSave }: Props) => {
|
||||||
size="small"
|
size="small"
|
||||||
onClick={sendSaveData}
|
onClick={sendSaveData}
|
||||||
/>
|
/>
|
||||||
</Link>
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const renderFavoriteButton =
|
const renderFavoriteButton =
|
||||||
|
|
@ -566,7 +564,6 @@ const GridRep = ({ party, loading, onClick, onSave }: Props) => {
|
||||||
<div className={styles.buttonArea}>
|
<div className={styles.buttonArea}>
|
||||||
{renderPrivateIcon}
|
{renderPrivateIcon}
|
||||||
{renderVisibilityIcon}
|
{renderVisibilityIcon}
|
||||||
{renderFavoriteButton}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.attributed}>
|
<div className={styles.attributed}>
|
||||||
|
|
@ -587,9 +584,10 @@ const GridRep = ({ party, loading, onClick, onSave }: Props) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<div className={gridRepClasses}>
|
||||||
|
{renderFavoriteButton}
|
||||||
<Link
|
<Link
|
||||||
href={`/p/${party.shortcode}`}
|
href={`/p/${party.shortcode}`}
|
||||||
className={gridRepClasses}
|
|
||||||
onMouseLeave={() => changeView('weapons')}
|
onMouseLeave={() => changeView('weapons')}
|
||||||
>
|
>
|
||||||
{detailsWithUsername}
|
{detailsWithUsername}
|
||||||
|
|
@ -630,6 +628,7 @@ const GridRep = ({ party, loading, onClick, onSave }: Props) => {
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</Link>
|
</Link>
|
||||||
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue