File tree 2 files changed +6
-3
lines changed
ui/v2.5/src/hooks/Lightbox
2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ import {
48
48
import { RatingSystem } from "src/components/Shared/Rating/RatingSystem" ;
49
49
import { useDebounce } from "../debounce" ;
50
50
import { isVideo } from "src/utils/visualFile" ;
51
+ import { imageTitle } from "src/core/files" ;
51
52
52
53
const CLASSNAME = "Lightbox" ;
53
54
const CLASSNAME_HEADER = `${ CLASSNAME } -header` ;
@@ -689,6 +690,7 @@ export const LightboxComponent: React.FC<IProps> = ({
689
690
}
690
691
691
692
const currentImage : ILightboxImage | undefined = images [ currentIndex ] ;
693
+ const title = currentImage ? imageTitle ( currentImage ) : undefined ;
692
694
693
695
function setRating ( v : number | null ) {
694
696
if ( currentImage ?. id ) {
@@ -932,9 +934,9 @@ export const LightboxComponent: React.FC<IProps> = ({
932
934
) }
933
935
</ div >
934
936
< div >
935
- { currentImage ?. title && (
937
+ { currentImage && (
936
938
< Link to = { `/images/${ currentImage . id } ` } onClick = { ( ) => close ( ) } >
937
- { currentImage . title ?? "" }
939
+ { title ?? "" }
938
940
</ Link >
939
941
) }
940
942
</ div >
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ interface IImagePaths {
8
8
9
9
interface IFiles {
10
10
__typename ?: string ;
11
+ path : string ;
11
12
width : number ;
12
13
height : number ;
13
14
video_codec ?: GQL . Maybe < string > ;
@@ -19,7 +20,7 @@ export interface ILightboxImage {
19
20
rating100 ?: GQL . Maybe < number > ;
20
21
o_counter ?: GQL . Maybe < number > ;
21
22
paths : IImagePaths ;
22
- visual_files ?: GQL . Maybe < IFiles > [ ] ;
23
+ visual_files ?: IFiles [ ] ;
23
24
}
24
25
25
26
export interface IChapter {
You can’t perform that action at this time.
0 commit comments