mirror of
https://github.com/rowyio/rowy.git
synced 2025-12-29 00:16:39 +01:00
fix build log snackbar not appearing for derivative function deploy
This commit is contained in:
@@ -12,6 +12,7 @@ import Loading from "@src/components/Loading";
|
||||
|
||||
import { useProjectContext } from "@src/contexts/ProjectContext";
|
||||
import { useConfirmation } from "@src/components/ConfirmationDialog";
|
||||
import { useSnackLogContext } from "@src/contexts/SnackLogContext";
|
||||
import { FieldType } from "@src/constants/fields";
|
||||
import { runRoutes } from "@src/constants/runRoutes";
|
||||
|
||||
@@ -27,6 +28,7 @@ export default function FieldSettings(props: IMenuModalProps) {
|
||||
|
||||
const { requestConfirmation } = useConfirmation();
|
||||
const { tableState, rowyRun } = useProjectContext();
|
||||
const snackLogContext = useSnackLogContext();
|
||||
|
||||
const rendedFieldSettings = useMemo(
|
||||
() =>
|
||||
@@ -164,6 +166,7 @@ export default function FieldSettings(props: IMenuModalProps) {
|
||||
cancel: "Later",
|
||||
handleConfirm: async () => {
|
||||
if (!rowyRun) return;
|
||||
snackLogContext.requestSnackLog();
|
||||
rowyRun({
|
||||
route: runRoutes.buildFunction,
|
||||
body: {
|
||||
|
||||
@@ -118,6 +118,7 @@ export default function BuildLogsSnack({ onClose, onOpenPanel }) {
|
||||
aria-label="Expand"
|
||||
size="small"
|
||||
onClick={() => setExpanded(!expanded)}
|
||||
style={{ color: "white" }}
|
||||
>
|
||||
{expanded ? <CollapseIcon /> : <ExpandIcon />}
|
||||
</IconButton>
|
||||
@@ -135,13 +136,19 @@ export default function BuildLogsSnack({ onClose, onOpenPanel }) {
|
||||
buildLogExpanded: 0,
|
||||
});
|
||||
}}
|
||||
style={{ color: "white" }}
|
||||
>
|
||||
<OpenIcon />
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
|
||||
<Tooltip title="Close">
|
||||
<IconButton aria-label="Close" size="small" onClick={onClose}>
|
||||
<IconButton
|
||||
aria-label="Close"
|
||||
size="small"
|
||||
onClick={onClose}
|
||||
style={{ color: "white" }}
|
||||
>
|
||||
<CloseIcon />
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
|
||||
@@ -76,8 +76,8 @@ export default function Extensions() {
|
||||
const handleSaveDeploy = async () => {
|
||||
handleSaveExtensions();
|
||||
try {
|
||||
snackLogContext.requestSnackLog();
|
||||
if (rowyRun)
|
||||
if (rowyRun) {
|
||||
snackLogContext.requestSnackLog();
|
||||
rowyRun({
|
||||
route: runRoutes.buildFunction,
|
||||
body: {
|
||||
@@ -86,7 +86,8 @@ export default function Extensions() {
|
||||
tableConfigPath: tableState?.config.tableConfig.path,
|
||||
},
|
||||
});
|
||||
analytics.logEvent("deployed_extensions");
|
||||
analytics.logEvent("deployed_extensions");
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user