Fix react warnings (#317)

This commit is contained in:
Infinite 2020-01-23 14:57:05 +01:00
parent 71dd939806
commit 498491e82d
6 changed files with 30 additions and 6 deletions

View File

@ -38,7 +38,7 @@ export const GalleryList: React.FC = () => {
<td>
<Link to={`/galleries/${gallery.id}`}>
{gallery.files.length > 0 ? (
<img alt="" src={`${gallery.files[0].path}?thumb=true`} />
<img alt={gallery.title ?? ''} src={`${gallery.files[0].path}?thumb=true`} />
) : (
undefined
)}

View File

@ -137,7 +137,7 @@ export const Studio: React.FC = () => {
return (
<div className="columns is-multiline no-spacing">
<div className="column is-half details-image-container">
<img className="studio" alt="" src={imagePreview} />
<img className="studio" alt={name} src={imagePreview} />
</div>
<div className="column is-half details-detail-container">
<DetailsEditNavbar

View File

@ -141,7 +141,7 @@ export const WallItem: FunctionComponent<IWallItemProps> = (
ref={videoHoverHook.videoEl}
/>
<img
alt="Preview"
alt={title}
src={previewPath || screenshotPath}
onError={() => previewNotFound()}
/>

View File

@ -188,7 +188,7 @@ export const Performer: React.FC = () => {
return (
<div className="columns is-multiline no-spacing">
<div className="column is-half details-image-container">
<img className="performer" src={imagePreview} alt='' />
<img className="performer" src={imagePreview} alt='Performer' />
</div>
<div className="column is-half details-detail-container">
{renderTabs()}
@ -215,7 +215,9 @@ export const Performer: React.FC = () => {
<>
<div id="performer-page">
<div className="details-image-container">
<img className="performer" src={imagePreview} onClick={openLightbox} alt='' />
<Button variant="link" onClick={openLightbox}>
<img className="performer" src={imagePreview} alt='Performer' />
</Button>
</div>
<div className="performer-head">
<h1 className="bp3-heading">

View File

@ -418,7 +418,7 @@ export const SceneEditPanel: React.FC<IProps> = (props: IProps) => {
</Button>
<Collapse in={isCoverImageOpen}>
<div>
<img className="scene-cover" src={coverImagePreview} alt="" />
<img className="scene-cover" src={coverImagePreview} alt="Scene cover" />
<Form.Group className="test" controlId="cover">
<Form.Control
type="file"

View File

@ -561,3 +561,25 @@ span.block {
width: 350px;
}
}
.button-link {
background-color: transparent;
color: #48aff0;
border-width: 0;
cursor: pointer;
display: inline;
padding: 0;
}
.button-link:hover {
text-decoration: underline;
}
.scrubber-button {
background-color: transparent;
color: #48aff0;
}
.scrubber-button:hover {
text-decoration: underline;
}