Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Frontend] Display progress bar under Epoch timer when user votes a post #570

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

badukwei
Copy link
Collaborator

@badukwei badukwei commented Nov 4, 2024

Summary

使用者投票時新增進度條

Linked Issue

close #550

Details

更新 action store 新增 voting 相關的動作,並且更新顯示文字以及 ui

@@ -7,6 +8,7 @@ import { immer } from 'zustand/middleware/immer'
export enum ActionType {
Post = 'post',
Comment = 'comment',
Vote = 'ote',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo error: vote

epoch: number | null
identityNonce: number
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建議可以分成兩種 Action :UpvoteDataDownvoteData,避免 ActionData 裡面有太多層級。這樣在 getActionMessagegetActionSubject 這兩個 function 就不用多一個參數與 Action 不相關的參數。把 vote 的邏輯留在 useVotes 就好。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[UST-237] [Frontend] Display progress bar under Epoch timer when user votes a post
2 participants