diff --git a/web/src/components/snapshots/AppSnapshotRestore.jsx b/web/src/components/snapshots/AppSnapshotRestore.jsx index 57734f44f1..7dc9db2fc3 100644 --- a/web/src/components/snapshots/AppSnapshotRestore.jsx +++ b/web/src/components/snapshots/AppSnapshotRestore.jsx @@ -44,6 +44,7 @@ class AppSnapshotRestore extends Component { fetchRestoreDetail = async () => { const { params } = this.props; const restoreName = params.id; + const appSlug = params.slug; this.setState({ errorMessage: "", @@ -52,7 +53,7 @@ class AppSnapshotRestore extends Component { try { const res = await fetch( - `${process.env.API_ENDPOINT}/app/${this.props.app?.slug}/snapshot/restore/${restoreName}`, + `${process.env.API_ENDPOINT}/app/${appSlug}/snapshot/restore/${restoreName}`, { method: "GET", credentials: "include", @@ -100,7 +101,9 @@ class AppSnapshotRestore extends Component { }); try { await this.fetchCancelRestore(); - this.props.navigate(`/snapshots/partial/${this.props.app?.slug}`); + const { params } = this.props; + const appSlug = params.slug; + this.props.navigate(`/snapshots/partial/${appSlug}`); } catch (err) { this.setState({ cancelRestoreErr: true, diff --git a/web/src/components/snapshots/SnapshotSettings.jsx b/web/src/components/snapshots/SnapshotSettings.jsx index b49524f2ca..0c08b05dd8 100644 --- a/web/src/components/snapshots/SnapshotSettings.jsx +++ b/web/src/components/snapshots/SnapshotSettings.jsx @@ -363,7 +363,7 @@ class SnapshotSettings extends Component { this.hideResetFileSystemWarningModal } isKurlEnabled={this.props.isKurlEnabled} - apps={this.props.apps} + apps={this.props.appsList} />