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> <td>
<Link to={`/galleries/${gallery.id}`}> <Link to={`/galleries/${gallery.id}`}>
{gallery.files.length > 0 ? ( {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 undefined
)} )}

View File

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

View File

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

View File

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

View File

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

View File

@ -561,3 +561,25 @@ span.block {
width: 350px; 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;
}