mirror of
https://github.com/portainer/portainer.git
synced 2025-07-22 14:59:41 +02:00
refactor(containers): migrate volumes tab to react [EE-5209] (#10284)
This commit is contained in:
parent
16ccf5871e
commit
e92f067e42
18 changed files with 398 additions and 143 deletions
13
app/react/docker/containers/CreateView/VolumesTab/context.ts
Normal file
13
app/react/docker/containers/CreateView/VolumesTab/context.ts
Normal file
|
@ -0,0 +1,13 @@
|
|||
import { createContext, useContext } from 'react';
|
||||
|
||||
export const InputContext = createContext<boolean | null>(null);
|
||||
|
||||
export function useInputContext() {
|
||||
const value = useContext(InputContext);
|
||||
|
||||
if (value === null) {
|
||||
throw new Error('useContext must be used within a Context.Provider');
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue