Skip to content

Commit

Permalink
fix: use correct default value for dislikeVariants
Browse files Browse the repository at this point in the history
  • Loading branch information
yndx-birman committed Jul 4, 2021
1 parent 164223b commit 106ec4e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/components/Feedback/Feedback.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {Control} from '../Control';
import {DividerControl} from '../Controls/single-controls';
import {PopperPosition} from '../../hooks';
import {ButtonThemes, FeedbackSendData, FeedbackType, Lang} from '../../models';
import {DISLIKE_VARIANTS} from '../../constants';

import LikeIcon from '../../../assets/icons/like.svg';
import DislikeIcon from '../../../assets/icons/dislike.svg';
Expand Down Expand Up @@ -50,7 +51,7 @@ const Feedback: React.FC<FeedbackInnerProps> = (props) => {
singlePage,
isLiked,
isDisliked,
dislikeVariants,
dislikeVariants = DISLIKE_VARIANTS[lang],
isVerticalView,
onSendFeedback,
view,
Expand Down
1 change: 0 additions & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,4 @@ export const DEFAULT_SETTINGS = {
textSize: TextSizes.M,
isLiked: false,
isDisliked: false,
dislikeVariants: DISLIKE_VARIANTS[Lang.Ru],
};
3 changes: 1 addition & 2 deletions src/demo/Components/DocPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
Theme,
DividerControl,
} from '../../../index';
import {DEFAULT_SETTINGS, DISLIKE_VARIANTS} from '../../../constants';
import {DEFAULT_SETTINGS} from '../../../constants';
import {getIsMobile} from '../../controls/settings';
import getLangControl from '../../controls/lang';
import getVcsControl from '../../controls/vcs';
Expand Down Expand Up @@ -73,7 +73,6 @@ const DocPageDemo = () => {
lang,
onChangeLang,
router,
dislikeVariants: DISLIKE_VARIANTS[lang],
headerHeight: fullScreen ? 0 : 64,
fullScreen,
onChangeFullScreen,
Expand Down

0 comments on commit 106ec4e

Please sign in to comment.