Skip to content

Commit

Permalink
Updated hello-world.web-view to fix using projectId
Browse files Browse the repository at this point in the history
  • Loading branch information
tjcouch-sil committed May 24, 2024
1 parent 0d26e62 commit 9609c67
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ globalThis.webViewComponent = function HelloWorld({
projectId ?? undefined,
).VerseUSFM(verseRef, 'Loading Verse');

const helloWorldProjectSettings = useHelloWorldProjectSettings('ParatextStandard', project);
const helloWorldProjectSettings = useHelloWorldProjectSettings('ParatextStandard', projectId);
const { headerStyle } = helloWorldProjectSettings;

const [localizedString] = usePromise(
Expand Down Expand Up @@ -274,14 +274,14 @@ globalThis.webViewComponent = function HelloWorld({
<div>
<Button
onClick={() =>
papi.commands.sendCommand('platformScriptureEditor.openScriptureEditor', project)
papi.commands.sendCommand('platformScriptureEditor.openScriptureEditor', projectId)
}
>
Open in Scripture Editor
</Button>
<Button
onClick={() =>
papi.commands.sendCommand('platformScriptureEditor.openResourceViewer', project)
papi.commands.sendCommand('platformScriptureEditor.openResourceViewer', projectId)
}
>
Open in Resource Viewer
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/services/web-view.service-host.ts
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ export function mergeUpdatablePropertiesIntoWebViewDefinitionIfChangesArePresent
// WebViewDefinitionUpdateInfo. Now I guess TypeScript isn't smart enough to realize that the
// property is going to be the same between these two objects since they both have all the
// possible properties of the key with the same types and are using the same key. Too bad :/
// @ts-expect-error ts(2322)
// @ts-ignore ts(2322)
updatedWebViewDefinition[key] = updateInfo[key];
didUpdateAnyProperties = true;
}
Expand Down

0 comments on commit 9609c67

Please sign in to comment.