Skip to content

Commit

Permalink
Fix empty automatic partial snapshots dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
sgalsaleh committed Sep 27, 2023
1 parent c877d13 commit c218b71
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions web/src/components/snapshots/AppSnapshotRestore.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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: "",
Expand All @@ -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",
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/snapshots/SnapshotSettings.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ class SnapshotSettings extends Component {
this.hideResetFileSystemWarningModal
}
isKurlEnabled={this.props.isKurlEnabled}
apps={this.props.apps}
apps={this.props.appsList}
/>
</div>
</div>
Expand Down

0 comments on commit c218b71

Please sign in to comment.