Skip to content

Commit 7dc42e4

Browse files
committed
chore: add settings.json
1 parent 0540e62 commit 7dc42e4

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"help_document_url": "https://docs-script-document.developers-6w5.pages.dev/script/introduction/"
3+
}

src/components/document_panel/document_panel.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { t } from '@vikadata/widget-sdk';
44
import { useTheme } from '@vikadata/components';
55
import { ChevronDownOutlined, ChevronUpOutlined, ColumnLinktableFilled } from '@vikadata/icons';
66
import { editorState, toggleDocumentPane, useDispatch, useSelector } from '../../store';
7+
import Settings from '../../settings.json';
78
import { Strings } from '../../utils';
89
import {
910
Container,
@@ -17,8 +18,6 @@ import {
1718
Content,
1819
} from '../console_panel/styled';
1920

20-
const DOCUMENT_URL = 'https://docs-script-document.developers-6w5.pages.dev/script/introduction/';
21-
2221
export const DocumentPanel = () => {
2322
const { isDocumentPaneOpen } = useSelector(editorState, shallowEqual);
2423
const dispatch = useDispatch();
@@ -33,7 +32,7 @@ export const DocumentPanel = () => {
3332

3433
const onOpen = (e) => {
3534
e.stopPropagation()
36-
window.open(DOCUMENT_URL, '_blank')
35+
window.open(Settings.help_document_url, '_blank')
3736
}
3837

3938
return (
@@ -59,7 +58,7 @@ export const DocumentPanel = () => {
5958
<Iframe
6059
ref={iframeRef}
6160
title="users-html"
62-
src={DOCUMENT_URL}
61+
src={Settings.help_document_url}
6362
sandbox="allow-same-origin allow-scripts"
6463
frameBorder={'none'}
6564
/>

0 commit comments

Comments
 (0)