Fix media not opening when switching hero status on Status page
This commit is contained in:
parent
c82be6d7ae
commit
ce97b9a242
1 changed files with 5 additions and 0 deletions
|
@ -68,6 +68,11 @@ function StatusPage(params) {
|
||||||
|
|
||||||
const sKey = statusKey(id, instance);
|
const sKey = statusKey(id, instance);
|
||||||
const [heroStatus, setHeroStatus] = useState(states.statuses[sKey]);
|
const [heroStatus, setHeroStatus] = useState(states.statuses[sKey]);
|
||||||
|
useEffect(() => {
|
||||||
|
if (states.statuses[sKey]) {
|
||||||
|
setHeroStatus(states.statuses[sKey]);
|
||||||
|
}
|
||||||
|
}, [sKey]);
|
||||||
|
|
||||||
const closeLink = useMemo(() => {
|
const closeLink = useMemo(() => {
|
||||||
const { prevLocation } = states;
|
const { prevLocation } = states;
|
||||||
|
|
Loading…
Add table
Reference in a new issue