Jelajahi Sumber

Reinstate uses of useScopeValue (#5544)

GitOrigin-RevId: d1eac1b18b042fbd4203cd37c79abef10cec626c
Alf Eaton 5 tahun lalu
induk
melakukan
be809a0de8
1 mengubah file dengan 4 tambahan dan 4 penghapusan
  1. 4 4
      services/web/frontend/js/shared/context/compile-context.js

+ 4 - 4
services/web/frontend/js/shared/context/compile-context.js

@@ -75,7 +75,7 @@ export function CompileProvider({ children }) {
   const [compiling, setCompiling] = useState(false)
   const [compiling, setCompiling] = useState(false)
 
 
   // the log entries parsed from the compile output log
   // the log entries parsed from the compile output log
-  const [logEntries, setLogEntries] = useState()
+  const [logEntries, setLogEntries] = useScopeValue('pdf.logEntries')
 
 
   // annotations for display in the editor, built from the log entries
   // annotations for display in the editor, built from the log entries
   const [logEntryAnnotations, setLogEntryAnnotations] = useScopeValue(
   const [logEntryAnnotations, setLogEntryAnnotations] = useScopeValue(
@@ -86,13 +86,13 @@ export function CompileProvider({ children }) {
   const [pdfViewer] = useScopeValue('settings.pdfViewer')
   const [pdfViewer] = useScopeValue('settings.pdfViewer')
 
 
   // the URL for downloading the PDF
   // the URL for downloading the PDF
-  const [pdfDownloadUrl, setPdfDownloadUrl] = useState()
+  const [pdfDownloadUrl, setPdfDownloadUrl] = useScopeValue('pdf.downloadUrl')
 
 
   // the URL for loading the PDF in the preview pane
   // the URL for loading the PDF in the preview pane
-  const [pdfUrl, setPdfUrl] = useState()
+  const [pdfUrl, setPdfUrl] = useScopeValue('pdf.url')
 
 
   // the project is considered to be "uncompiled" if a doc has changed since the last compile started
   // the project is considered to be "uncompiled" if a doc has changed since the last compile started
-  const [uncompiled, setUncompiled] = useState()
+  const [uncompiled, setUncompiled] = useScopeValue('pdf.uncompiled')
 
 
   // the id of the CLSI server which ran the compile
   // the id of the CLSI server which ran the compile
   const [clsiServerId, setClsiServerId] = useState()
   const [clsiServerId, setClsiServerId] = useState()