Skip to content

Commit 0038878

Browse files
committed
render the new star rating component or the deprecated component depending on if the user is in the test variant
1 parent 3c8aca0 commit 0038878

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

dotcom-rendering/src/components/StarRatingBlockComponent.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { css } from '@emotion/react';
22
import { palette } from '../palette';
33
import type { StarRating as Rating, RatingSizeType } from '../types/content';
4+
import { StarRating } from './StarRating/StarRating';
45
import { StarRatingDeprecated } from './StarRating/StarRatingDeprecated';
56

67
type Props = {
@@ -27,6 +28,10 @@ export const StarRatingBlockComponent = ({
2728
css={[starsWrapper, !isInStarRatingVariant && starWrapperColour]}
2829
data-spacefinder-role="inline"
2930
>
30-
<StarRatingDeprecated rating={rating} size={size} />
31+
{isInStarRatingVariant ? (
32+
<StarRating rating={rating} size={size} />
33+
) : (
34+
<StarRatingDeprecated rating={rating} size={size} />
35+
)}
3136
</div>
3237
);

0 commit comments

Comments
 (0)