use editor data hook

This commit is contained in:
Jan Prochazka
2020-12-03 15:16:22 +01:00
parent 9a42d1d6bd
commit fc5c0eb239
9 changed files with 182 additions and 142 deletions

View File

@@ -42,8 +42,7 @@ export function SavedSqlFileAppObject({ data, commonProps }) {
onLoad={(data) => {
newQuery({
title: file,
// @ts-ignore
initialScript: data,
initialData: data,
});
}}
/>
@@ -60,14 +59,15 @@ export function SavedShellFileAppObject({ data, commonProps }) {
format="text"
icon="img shell"
onLoad={(data) => {
openNewTab(setOpenedTabs, {
title: file,
icon: 'img shell',
tabComponent: 'ShellTab',
props: {
initialScript: data,
openNewTab(
setOpenedTabs,
{
title: file,
icon: 'img shell',
tabComponent: 'ShellTab',
},
});
data
);
}}
/>
);