1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 15:59:41 +02:00

refactor(portainer): move to react [EE-3350] (#7915)

This commit is contained in:
Chaim Lev-Ari 2022-11-13 10:10:18 +02:00 committed by GitHub
parent 30e23ea5b4
commit 78dcba614d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
192 changed files with 200 additions and 211 deletions

View file

@ -0,0 +1,13 @@
import { useCurrentStateAndParams } from '@uirouter/react';
export function useEnvironmentId() {
const {
params: { endpointId: environmentId },
} = useCurrentStateAndParams();
if (!environmentId) {
throw new Error('endpointId url param is required');
}
return environmentId;
}