diff --git a/src/components/atoms/Rating/Rating.tsx b/src/components/atoms/Rating/Rating.tsx index 056cc428..2d372580 100644 --- a/src/components/atoms/Rating/Rating.tsx +++ b/src/components/atoms/Rating/Rating.tsx @@ -109,7 +109,7 @@ export const Rating: React.FC = (props) => { const { count = 5, ratingValue, - label, + // label, onRateClick, onIconEnter, onIconLeave, @@ -118,7 +118,7 @@ export const Rating: React.FC = (props) => { const startToRender = Array.from(Array(count).keys()); return ( @@ -153,7 +153,7 @@ export const Rating: React.FC = (props) => { /> ); })} - {label && {label}} + {/* {label && {label}} */} ); }; diff --git a/src/components/molecules/Rate/Rate.tsx b/src/components/molecules/Rate/Rate.tsx index 68f3d995..191e907e 100644 --- a/src/components/molecules/Rate/Rate.tsx +++ b/src/components/molecules/Rate/Rate.tsx @@ -1,14 +1,15 @@ import * as React from "react"; -import { useState, useMemo } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import styled from "styled-components"; import { ExtendableStyledComponent } from "types/component"; import { Button } from "../../atoms/Button/Button"; import { Rating } from "../../atoms/Rating/Rating"; -import { Text } from "../../atoms/Typography/Text"; +// import { Text } from "../../atoms/Typography/Text"; import { Title } from "../../atoms/Typography/Title"; interface Props extends ExtendableStyledComponent { + score?: number; submitLabel?: string; cancelLabel?: string; header?: string; @@ -40,6 +41,7 @@ const StyledRate = styled.div` export const Rate: React.FC = (props) => { const { t } = useTranslation(); const { + score, header = "Rate.Header", submitLabel = "Rate.submitButton", cancelLabel = "Rate.cancelButton", @@ -52,15 +54,15 @@ export const Rate: React.FC = (props) => { const [selectedRate, setSelectedRate] = useState(0); const [hoverRate, setHoverRate] = useState(); - const selectInfoText = useMemo(() => { - if (hoverRate) { - return t(`Rate.Select${hoverRate}`); - } - if (selectedRate === 0) { - return t("Rate.Select"); - } - return t(`Rate.Select${selectedRate}`); - }, [selectedRate, hoverRate]); + // const selectInfoText = useMemo(() => { + // if (hoverRate) { + // return t(`Rate.Select${hoverRate}`); + // } + // if (selectedRate === 0) { + // return t("Rate.Select"); + // } + // return t(`Rate.Select${selectedRate}`); + // }, [selectedRate, hoverRate]); return ( @@ -68,6 +70,7 @@ export const Rate: React.FC = (props) => { {t(header)} { @@ -79,13 +82,14 @@ export const Rate: React.FC = (props) => { setHoverRate(undefined); }} /> - {selectInfoText} + {/* {selectInfoText} */} {children}