mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2025-01-26 11:55:52 +00:00
d8a92812d8
* Adding vote display modes * Only show downvotes setting if site has downvotes enabled.
15 lines
394 B
TypeScript
15 lines
394 B
TypeScript
import { GetSiteResponse, LocalUserVoteDisplayMode } from "lemmy-js-client";
|
|
|
|
export default function voteDisplayMode(
|
|
siteRes: GetSiteResponse,
|
|
): LocalUserVoteDisplayMode {
|
|
return (
|
|
siteRes?.my_user?.local_user_view.local_user_vote_display_mode ?? {
|
|
local_user_id: -1,
|
|
upvotes: true,
|
|
downvotes: true,
|
|
score: false,
|
|
upvote_percentage: false,
|
|
}
|
|
);
|
|
}
|