Miko fixes 0.52.2 a2 #7451
1 changed files with 15 additions and 8 deletions
|
@ -273,13 +273,19 @@ function CollectionForm(props: Props) {
|
||||||
|
|
||||||
// on mount, if we get a collectionChannel, set it.
|
// on mount, if we get a collectionChannel, set it.
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
if (hasClaim && !initialized) {
|
if (!initialized) {
|
||||||
|
if (hasClaim) {
|
||||||
if (collectionChannel) {
|
if (collectionChannel) {
|
||||||
setActiveChannel(collectionChannel);
|
setActiveChannel(collectionChannel);
|
||||||
setIncognito(false);
|
setIncognito(false);
|
||||||
} else if (!collectionChannel && hasClaim) {
|
} else if (!collectionChannel && hasClaim) {
|
||||||
setIncognito(true);
|
setIncognito(true);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (incognito) {
|
||||||
|
setIncognito(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
setInitialized(true);
|
setInitialized(true);
|
||||||
}
|
}
|
||||||
}, [setInitialized, setActiveChannel, collectionChannel, setIncognito, hasClaim, incognito, initialized]);
|
}, [setInitialized, setActiveChannel, collectionChannel, setIncognito, hasClaim, incognito, initialized]);
|
||||||
|
@ -287,9 +293,10 @@ function CollectionForm(props: Props) {
|
||||||
// every time activechannel or incognito changes, set it.
|
// every time activechannel or incognito changes, set it.
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
if (initialized) {
|
if (initialized) {
|
||||||
if (activeChannelId) {
|
if (activeChannelId && !incognito) {
|
||||||
setParam({ channel_id: activeChannelId });
|
setParam({ channel_id: activeChannelId });
|
||||||
} else if (incognito) {
|
}
|
||||||
|
if (incognito) {
|
||||||
setParam({ channel_id: undefined });
|
setParam({ channel_id: undefined });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue