mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix(challenge flow): abandon publish immediately on modal close
This commit is contained in:
@@ -26,12 +26,11 @@ const useChallengesStore = create<State>((set, get) => ({
|
||||
},
|
||||
abandonCurrentChallenge: async () => {
|
||||
const currentChallenge = get().challenges[0];
|
||||
get().removeChallenge();
|
||||
try {
|
||||
await currentChallenge?.onAbandon?.();
|
||||
} catch (error) {
|
||||
console.error('Failed to abandon challenge publication:', error);
|
||||
} finally {
|
||||
get().removeChallenge();
|
||||
}
|
||||
},
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user