diff --git a/src/common/features/polls/api/get-poll-details-query.ts b/src/common/features/polls/api/get-poll-details-query.ts index e3031a416f4..f81fe8fcd02 100644 --- a/src/common/features/polls/api/get-poll-details-query.ts +++ b/src/common/features/polls/api/get-poll-details-query.ts @@ -33,7 +33,7 @@ export function useGetPollDetailsQuery(entry?: Entry) { queryFn: () => axios .get( - `https://polls.hivehub.dev/rpc/poll?author=eq.${entry!!.author}&permlink=eq.${ + `https://polls.ecency.com/rpc/poll?author=eq.${entry!!.author}&permlink=eq.${ entry!!.permlink }` ) diff --git a/src/common/features/polls/components/poll-widget.tsx b/src/common/features/polls/components/poll-widget.tsx index 2a6a37fbf54..e6bd2f1b849 100644 --- a/src/common/features/polls/components/poll-widget.tsx +++ b/src/common/features/polls/components/poll-widget.tsx @@ -38,8 +38,8 @@ export function PollWidget({ poll, isReadOnly, entry }: Props) { const endTimeFullDate = useMemo(() => format(poll.endTime, "dd.MM.yyyy HH:mm"), [poll.endTime]); const isFinished = useMemo(() => isBefore(poll.endTime, new Date()), [poll.endTime]); const showViewVotes = useMemo( - () => poll.hide_votes && !resultsMode, - [poll.hide_votes, resultsMode] + () => poll.hideVotes && !resultsMode, + [poll.hideVotes, resultsMode] ); const showChangeVote = useMemo( () => poll.voteChange && resultsMode && pollDetails.data?.status === "Active", diff --git a/src/common/features/polls/components/polls-creation.tsx b/src/common/features/polls/components/polls-creation.tsx index 9a20d7cb534..4cd1ab46d78 100644 --- a/src/common/features/polls/components/polls-creation.tsx +++ b/src/common/features/polls/components/polls-creation.tsx @@ -18,7 +18,7 @@ export interface PollSnapshot { title: string; choices: string[]; voteChange: boolean; - hide_votes: boolean; + hideVotes: boolean; filters: { accountAge: number; }; @@ -57,7 +57,7 @@ export function PollsCreation({ setEndDate, interpretation, setInterpretation, - hide_votes, + hideVotes, setHideVotes, voteChange, setVoteChange, @@ -173,7 +173,7 @@ export function PollsCreation({ disabled={readonly} type="checkbox" label={_t("polls.current-standing")} - checked={!!hide_votes} + checked={!!hideVotes} onChange={(e: boolean) => setHideVotes(e)} /> @@ -223,7 +223,7 @@ export function PollsCreation({ endTime: endDate, choices, voteChange: !!voteChange, - hide_votes: !!hide_votes, + hideVotes: !!hideVotes, filters: { accountAge }, diff --git a/src/common/features/polls/hooks/use-polls-creation-management.ts b/src/common/features/polls/hooks/use-polls-creation-management.ts index eacd5d132fe..324fd0b842a 100644 --- a/src/common/features/polls/hooks/use-polls-creation-management.ts +++ b/src/common/features/polls/hooks/use-polls-creation-management.ts @@ -43,7 +43,7 @@ export function usePollsCreationManagement(poll?: PollSnapshot) { setEndDate(poll.endTime); setInterpretation(poll.interpretation); setVoteChange(poll.voteChange); - setHideVotes(poll.hide_votes); + setHideVotes(poll.hideVotes); } }, [poll]); @@ -75,7 +75,7 @@ export function usePollsCreationManagement(poll?: PollSnapshot) { setEndDate, interpretation, setInterpretation, - hide_votes, + hideVotes, setHideVotes, voteChange, setVoteChange, diff --git a/src/common/features/polls/utils/build-poll-json-metadata.ts b/src/common/features/polls/utils/build-poll-json-metadata.ts index 4dd1780f1c0..ba0840847cb 100644 --- a/src/common/features/polls/utils/build-poll-json-metadata.ts +++ b/src/common/features/polls/utils/build-poll-json-metadata.ts @@ -9,7 +9,7 @@ export function buildPollJsonMetadata(poll: PollSnapshot) { choices: poll.choices, preferred_interpretation: poll.interpretation, token: null, - hide_votes: poll.hide_votes, + hide_votes: poll.hideVotes, vote_change: poll.voteChange, filters: { account_age: poll.filters.accountAge diff --git a/src/common/pages/entry/utils/use-entry-poll-extractor.ts b/src/common/pages/entry/utils/use-entry-poll-extractor.ts index e9c1bbd8a33..431bda9043f 100644 --- a/src/common/pages/entry/utils/use-entry-poll-extractor.ts +++ b/src/common/pages/entry/utils/use-entry-poll-extractor.ts @@ -15,7 +15,7 @@ export function useEntryPollExtractor(entry?: Entry | null) { endTime: new Date((entry.json_metadata as JsonPollMetadata)?.end_time * 1000), interpretation: (entry.json_metadata as JsonPollMetadata)?.preferred_interpretation, voteChange: (entry.json_metadata as JsonPollMetadata)?.vote_change ?? true, - hide_votes: (entry.json_metadata as JsonPollMetadata)?.hide_votes ?? false, + hideVotes: (entry.json_metadata as JsonPollMetadata)?.hide_votes ?? false, filters: { accountAge: (entry.json_metadata as JsonPollMetadata)?.filters.account_age } diff --git a/src/common/store/entries/types.ts b/src/common/store/entries/types.ts index c64ca6267bd..51e363aa7fb 100644 --- a/src/common/store/entries/types.ts +++ b/src/common/store/entries/types.ts @@ -27,7 +27,7 @@ export interface JsonPollMetadata { preferred_interpretation: string; token: string; vote_change: boolean; - current_standing: boolean; + hide_votes: boolean; filters: { account_age: number }; end_time: number; }