Skip to content

Commit

Permalink
[ECO-1845] Fix carousel text to flatten correctly (#104)
Browse files Browse the repository at this point in the history
Co-authored-by: matt <[email protected]>
  • Loading branch information
xbtmatt and matt authored Jun 14, 2024
1 parent 2d30825 commit ecab4d0
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ const Item = ({ children }: { children: React.ReactNode }) => {
</div>
);
};

const TextCarousel = () => {
const messages = ["Universal ownership", "Universal blockchain", "Universal language"];
const firstCarousel = messages
.flatMap((message) => Array.from({ length: 5 }, () => message))

const firstCarousel = Array.from({ length: 5 }, () => messages)
.flatMap((m) => m)
.map((message, index) => <Item key={`first::${message}::${index}`}>{message}</Item>);
const secondCarousel = messages
.flatMap((message) => Array.from({ length: 5 }, () => message))
const secondCarousel = Array.from({ length: 5 }, () => messages)
.flatMap((m) => m)
.map((message, index) => <Item key={`second::${message}::${index}`}>{message}</Item>);

return (
Expand Down

0 comments on commit ecab4d0

Please sign in to comment.