From f6a741f38a33bdb30b3a1d88215656dcd3d0712d Mon Sep 17 00:00:00 2001 From: bobzel Date: Mon, 29 Apr 2024 23:00:22 -0400 Subject: eslint fixes. --- .../views/newlightbox/Header/LightboxHeader.tsx | 43 +++++++++++----------- src/client/views/newlightbox/Header/index.ts | 2 +- 2 files changed, 22 insertions(+), 23 deletions(-) (limited to 'src/client/views/newlightbox/Header') diff --git a/src/client/views/newlightbox/Header/LightboxHeader.tsx b/src/client/views/newlightbox/Header/LightboxHeader.tsx index f89d3173a..51bfaa4e5 100644 --- a/src/client/views/newlightbox/Header/LightboxHeader.tsx +++ b/src/client/views/newlightbox/Header/LightboxHeader.tsx @@ -12,13 +12,13 @@ import { getType } from '../utils'; import './LightboxHeader.scss'; import { INewLightboxHeader } from './utils'; -export const NewLightboxHeader = (props: INewLightboxHeader) => { +export function NewLightboxHeader(props: INewLightboxHeader) { const { height = 100, width } = props; const [doc, setDoc] = React.useState(LightboxView.LightboxDoc); const [editing, setEditing] = React.useState(false); const [title, setTitle] = React.useState(null); React.useEffect(() => { - let lbDoc = LightboxView.LightboxDoc; + const lbDoc = LightboxView.LightboxDoc; setDoc(lbDoc); if (lbDoc) { setTitle( @@ -37,24 +37,23 @@ export const NewLightboxHeader = (props: INewLightboxHeader) => { const [saved, setSaved] = React.useState(false); if (!doc) return null; - else - return ( -
e.stopPropagation()} style={{ minHeight: height, height: height, width: width }}> -
-
Title
- {title} -
-
-
Type
-
{getType(StrCast(doc.type))}
-
-
- setSaved(!saved)} color={Colors.DARK_GRAY} icon={saved ? : } /> - setSaved(!saved)} color={Colors.DARK_GRAY} icon={saved ? : } /> -
-
-
+ return ( +
e.stopPropagation()} style={{ minHeight: height, height: height, width: width }}> +
+
Title
+ {title}
- ); -}; +
+
Type
+
{getType(StrCast(doc.type))}
+
+
+ setSaved(!saved)} color={Colors.DARK_GRAY} icon={saved ? : } /> + setSaved(!saved)} color={Colors.DARK_GRAY} icon={saved ? : } /> +
+
+
+
+ ); +} diff --git a/src/client/views/newlightbox/Header/index.ts b/src/client/views/newlightbox/Header/index.ts index 090677c16..88a533585 100644 --- a/src/client/views/newlightbox/Header/index.ts +++ b/src/client/views/newlightbox/Header/index.ts @@ -1 +1 @@ -export * from './LightboxHeader' \ No newline at end of file +export * from './LightboxHeader'; -- cgit v1.2.3-70-g09d2