fix anon collection publishing

This commit is contained in:
zeppi 2022-01-29 17:19:24 -05:00
parent 258c05b1a2
commit 1f6e57d911

View file

@ -273,13 +273,19 @@ function CollectionForm(props: Props) {
// on mount, if we get a collectionChannel, set it.
React.useEffect(() => {
if (hasClaim && !initialized) {
if (!initialized) {
if (hasClaim) {
if (collectionChannel) {
setActiveChannel(collectionChannel);
setIncognito(false);
} else if (!collectionChannel && hasClaim) {
setIncognito(true);
}
} else {
if (incognito) {
setIncognito(true);
}
}
setInitialized(true);
}
}, [setInitialized, setActiveChannel, collectionChannel, setIncognito, hasClaim, incognito, initialized]);
@ -287,9 +293,10 @@ function CollectionForm(props: Props) {
// every time activechannel or incognito changes, set it.
React.useEffect(() => {
if (initialized) {
if (activeChannelId) {
if (activeChannelId && !incognito) {
setParam({ channel_id: activeChannelId });
} else if (incognito) {
}
if (incognito) {
setParam({ channel_id: undefined });
}
}