Merge branch 'develop' of https://github.com/rowyio/rowy into develop

This commit is contained in:
Sidney Alcantara
2021-10-14 19:55:05 +11:00

View File

@@ -210,7 +210,21 @@ export const ProjectContextProvider: React.FC = ({ children }) => {
// rowyRun access
const _rowyRun: IProjectContext["rowyRun"] = async (args) => {
const authToken = await getAuthToken();
return rowyRun({ rowyRunUrl: settings.doc.rowyRunUrl, authToken, ...args });
if (settings.doc.rowyRunUrl)
return rowyRun({
rowyRunUrl: settings.doc.rowyRunUrl,
authToken,
...args,
});
else {
enqueueSnackbar(
`RowyRun is not setup. Checkout the docs for installation guide`,
{
variant: "error",
}
);
return { success: false, error: "rowyRun is not setup" };
}
};
// A ref to the data grid. Contains data grid functions