Adopt compact shared workspace feedback

This commit is contained in:
2026-08-04 08:21:50 +02:00
parent 9b5d83d65a
commit ee19343697
2 changed files with 7 additions and 3 deletions
+4 -3
View File
@@ -52,6 +52,7 @@ export default function VotingPage({ settings, auth }: PlatformRouteContext) {
const canCast = hasScope(auth, "voting:ballot:cast");
const canCertify = hasScope(auth, "voting:ballot:certify");
const canAdmin = hasScope(auth, "voting:ballot:admin");
const currentAccountId = auth.principal?.account_id || auth.user.account_id;
const loadList = useCallback(async (signal?: AbortSignal, preferredId?: string) => {
setLoading(true);
@@ -94,8 +95,8 @@ export default function VotingPage({ settings, auth }: PlatformRouteContext) {
}, [selectedId, settings]);
const eligible = useMemo(() => Boolean(
selected?.electorate.some((item) => item.subject_id === auth.account.id)
), [auth.account.id, selected]);
selected?.electorate.some((item) => item.subject_id === currentAccountId)
), [currentAccountId, selected]);
async function run(action: "open" | "close" | "certify") {
if (!selected) return;
@@ -240,7 +241,7 @@ export default function VotingPage({ settings, auth }: PlatformRouteContext) {
open
settings={settings}
ballot={editing === "new" ? null : editing}
currentAccountId={auth.account.id}
currentAccountId={currentAccountId}
onClose={() => setEditing(null)}
onSaved={(ballot) => {
setEditing(null);