Merge branch 'master' of github.com:bitsocialnet/5chan

This commit is contained in:
Tommaso Casaburi
2026-06-08 16:56:10 +07:00
5 changed files with 122 additions and 7 deletions
+19
View File
@@ -0,0 +1,19 @@
import { create } from 'zustand';
interface FailedPostRetryState {
// Account-comment index of the failed post currently being retried, or null when no retry is in flight.
// Retrying deletes the old pending row and republishes, so the pending route briefly has no addressable
// comment and no active challenge. The pending view reads this to avoid mistaking that gap for an
// abandoned challenge and redirecting away.
retryingAccountCommentIndex: number | null;
startRetry: (accountCommentIndex: number) => void;
endRetry: () => void;
}
const useFailedPostRetryStore = create<FailedPostRetryState>((set) => ({
retryingAccountCommentIndex: null,
startRetry: (accountCommentIndex) => set({ retryingAccountCommentIndex: accountCommentIndex }),
endRetry: () => set({ retryingAccountCommentIndex: null }),
}));
export default useFailedPostRetryStore;