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

Add feature flag for upvotes drawer. #6687

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import React, { useEffect, useState } from 'react';
import app from 'state';

import { ViewCommentUpvotesDrawer } from 'client/scripts/views/components/UpvoteDrawer';
import { featureFlags } from 'helpers/feature-flags';
import type Comment from 'models/Comment';
import { CommentReactionButton } from 'views/components/ReactionButton/CommentReactionButton';
import { PopoverMenu } from 'views/components/component_kit/CWPopoverMenu';
Expand Down Expand Up @@ -179,7 +180,9 @@ export const CommentCard = ({
onReaction={handleReaction}
/>

<ViewCommentUpvotesDrawer comment={comment} />
{featureFlags.communityStake && (
<ViewCommentUpvotesDrawer comment={comment} />
)}

<SharePopover commentId={comment.id} />

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ViewThreadUpvotesDrawer } from 'client/scripts/views/components/UpvoteDrawer';
import { featureFlags } from 'helpers/feature-flags';
import useUserActiveAccount from 'hooks/useUserActiveAccount';
import Thread from 'models/Thread';
import React, { useState } from 'react';
Expand Down Expand Up @@ -86,7 +87,9 @@ export const ThreadOptions = ({
}}
>
<div className="options-container">
{!upvoteDrawerBtnBelow && <ViewThreadUpvotesDrawer thread={thread} />}
{featureFlags.communityStake && !upvoteDrawerBtnBelow && (
<ViewThreadUpvotesDrawer thread={thread} />
)}

{upvoteBtnVisible && thread && (
<ReactionButton
Expand Down Expand Up @@ -136,7 +139,9 @@ export const ThreadOptions = ({
/>
)}
</div>
{upvoteDrawerBtnBelow && <ViewThreadUpvotesDrawer thread={thread} />}
{featureFlags.communityStake && upvoteDrawerBtnBelow && (
<ViewThreadUpvotesDrawer thread={thread} />
)}
</div>
{thread && <></>}
</>
Expand Down
Loading