Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] App details returns to apps table, instead of previous page. #18080

Merged
merged 1 commit into from
Jul 3, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions client/admin/apps/AppDetailsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import ExternalLink from '../../components/basic/ExternalLink';
import PriceDisplay from './PriceDisplay';
import AppStatus from './AppStatus';
import AppMenu from './AppMenu';
import { useRoute } from '../../contexts/RouterContext';
import { useRoute, useCurrentRoute } from '../../contexts/RouterContext';
import { useTranslation } from '../../contexts/TranslationContext';
import { useAppInfo } from './hooks/useAppInfo';
import { useAbsoluteUrl } from '../../contexts/ServerContext';
Expand Down Expand Up @@ -168,7 +168,9 @@ export default function AppDetailsPage({ id }) {
const settingsRef = useRef({});

const data = useAppInfo(id);
const router = useRoute('admin-apps');

const [currentRouteName] = useCurrentRoute();
const router = useRoute(currentRouteName);
const handleReturn = () => router.push({});

const isLoading = Object.values(data).length === 0;
Expand Down