aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/newlightbox/Header
diff options
context:
space:
mode:
authorNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-05-09 00:02:30 -0400
committerNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-05-09 00:02:30 -0400
commit2f5f13946cf0a1ec87efddbfbbc6a9fd878da924 (patch)
treeea9ec90561f73ed1c977e0538699c5f53b3c4712 /src/client/views/newlightbox/Header
parent0766ba00727e9e13ced2e16cfb049d49711fa738 (diff)
parentfa4d377b53c9ca31d8900d9c11bd25be57025962 (diff)
Merge branch 'nathan-starter' of https://github.com/brown-dash/Dash-Web into nathan-starter
Diffstat (limited to 'src/client/views/newlightbox/Header')
-rw-r--r--src/client/views/newlightbox/Header/LightboxHeader.tsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/views/newlightbox/Header/LightboxHeader.tsx b/src/client/views/newlightbox/Header/LightboxHeader.tsx
index 51bfaa4e5..882d28fba 100644
--- a/src/client/views/newlightbox/Header/LightboxHeader.tsx
+++ b/src/client/views/newlightbox/Header/LightboxHeader.tsx
@@ -4,8 +4,8 @@ import { BsBookmark, BsBookmarkFill } from 'react-icons/bs';
import { MdTravelExplore } from 'react-icons/md';
import { Doc } from '../../../../fields/Doc';
import { StrCast } from '../../../../fields/Types';
-import { LightboxView } from '../../LightboxView';
import { Colors } from '../../global/globalEnums';
+import { DocumentView } from '../../nodes/DocumentView';
import { NewLightboxView } from '../NewLightboxView';
import { EditableText } from '../components/EditableText';
import { getType } from '../utils';
@@ -14,11 +14,11 @@ import { INewLightboxHeader } from './utils';
export function NewLightboxHeader(props: INewLightboxHeader) {
const { height = 100, width } = props;
- const [doc, setDoc] = React.useState<Doc | undefined>(LightboxView.LightboxDoc);
+ const [doc, setDoc] = React.useState<Doc | undefined>(DocumentView.LightboxDoc());
const [editing, setEditing] = React.useState<boolean>(false);
const [title, setTitle] = React.useState<JSX.Element | null>(null);
React.useEffect(() => {
- const lbDoc = LightboxView.LightboxDoc;
+ const lbDoc = DocumentView.LightboxDoc();
setDoc(lbDoc);
if (lbDoc) {
setTitle(
@@ -32,7 +32,7 @@ export function NewLightboxHeader(props: INewLightboxHeader) {
/>
);
}
- }, [LightboxView.LightboxDoc]);
+ }, [DocumentView.LightboxDoc()]);
const [saved, setSaved] = React.useState<boolean>(false);