use state switch to disable actions