Skip to content

Commit

Permalink
fix: link errors fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
boris0301 committed Aug 6, 2024
1 parent 55e6451 commit f786750
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@ const EditDiagramDialog = () => {
};

getMetadata();
}, [authState, editUrl]);
}, [authState]);

useEffect(() => {
const handleMessage = async (e: MessageEvent) => {
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ const PreviewDiagramDialog = () => {
if (!authState?.authorized || !previewUrl) return;
const url = buildUrl(previewUrl, authState.token);
setDiagramsUrl(url);
}, [authState, previewUrl]);
}, [authState]);

if (authStatus === 'idle' || authStatus === 'loading') {
return (
4 changes: 2 additions & 2 deletions src/client/sidebar/components/Sidebar.tsx
Original file line number Diff line number Diff line change
@@ -88,7 +88,7 @@ const Sidebar = () => {
if (!data.editUrl) return;
try {
localStorage.setItem('editUrl', data.editUrl);
await serverFunctions.openEditDiagramDialogWithUrl(data.editUrl);
await serverFunctions.openEditDiagramDialogWithUrl();
} catch (error) {
console.error('Error opening edit dialog', error);
}
@@ -109,7 +109,7 @@ const Sidebar = () => {
return () => {
window.removeEventListener('message', handleMessage);
};
}, []);
}, [getImages]);

const handleLoginClick = async () => {
const width = 500;
2 changes: 1 addition & 1 deletion src/server/ui.js
Original file line number Diff line number Diff line change
@@ -69,7 +69,7 @@ export const openPreviewDiagramDialog = () => {
DocumentApp.getUi().showModalDialog(html, 'Preview Diagram');
};

export const openEditDiagramDialogWithUrl = (editUrl) => {
export const openEditDiagramDialogWithUrl = () => {
const html = HtmlService.createHtmlOutputFromFile('edit-diagram-dialog')
.append(
`<script>

0 comments on commit f786750

Please sign in to comment.