File tree Expand file tree Collapse file tree 3 files changed +25
-2
lines changed
src/pages/_home/companies Expand file tree Collapse file tree 3 files changed +25
-2
lines changed Original file line number Diff line number Diff line change 3333 "@fontsource/ubuntu" : " ^4.5.4" ,
3434 "@mdx-js/react" : " ^1.6.21" ,
3535 "@svgr/webpack" : " ^5.5.0" ,
36+ "@types/lodash-es" : " ^4.17.6" ,
3637 "clsx" : " ^1.1.1" ,
3738 "docusaurus-plugin-hotjar" : " ^0.0.2" ,
3839 "dotenv" : " ^10.0.0" ,
3940 "file-loader" : " ^6.2.0" ,
4041 "js-cookie" : " ^3.0.1" ,
42+ "lodash-es" : " ^4.17.21" ,
4143 "picocolors" : " ^1.0.0" ,
4244 "react" : " ^17.0.1" ,
4345 "react-cookie-consent" : " ^6.4.1" ,
Original file line number Diff line number Diff line change 1- import React from "react" ;
1+ import React , { useMemo } from "react" ;
22// It's utility, not hook =)
33import getBaseUrl from "@docusaurus/useBaseUrl" ;
44import { translate } from "@docusaurus/Translate" ;
55import Marquee from "react-fast-marquee" ;
6+ import { shuffle } from "lodash-es" ;
67import { Section } from "@site/src/shared/ui" ;
8+
79import { companies } from "./_config" ;
810import styles from "./styles.module.scss" ;
911
1012export const Companies = ( ) => {
13+ const companiesShuffled = useMemo ( ( ) => shuffle ( companies ) , [ ] ) ;
14+
1115 return (
1216 < Section
1317 title = { translate ( { id : "pages.home.companies.using" } ) }
1418 className = { styles . root }
1519 containerClass = { styles . rootContainer }
1620 >
1721 < Marquee pauseOnHover >
18- { companies . map ( ( { url, src, alt } ) => (
22+ { companiesShuffled . map ( ( { url, src, alt } ) => (
1923 < a
2024 key = { src }
2125 className = { styles . item }
Original file line number Diff line number Diff line change 33313331 resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee"
33323332 integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4=
33333333
3334+ "@types/lodash-es@^4.17.6":
3335+ version "4.17.6"
3336+ resolved "https://registry.yarnpkg.com/@types/lodash-es/-/lodash-es-4.17.6.tgz#c2ed4c8320ffa6f11b43eb89e9eaeec65966a0a0"
3337+ integrity sha512-R+zTeVUKDdfoRxpAryaQNRKk3105Rrgx2CFRClIgRGaqDTdjsm8h6IYA8ir584W3ePzkZfst5xIgDwYrlh9HLg==
3338+ dependencies:
3339+ "@types/lodash" "*"
3340+
3341+ "@types/lodash@*":
3342+ version "4.14.191"
3343+ resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.191.tgz#09511e7f7cba275acd8b419ddac8da9a6a79e2fa"
3344+ integrity sha512-BdZ5BCCvho3EIXw6wUCXHe7rS53AIDPLE+JzwgT+OsJk53oBfbSmZZ7CX4VaRoN78N+TJpFi9QPlfIVNmJYWxQ==
3345+
33343346"@types/mdast@^3.0.0":
33353347 version "3.0.10"
33363348 resolved "https://registry.yarnpkg.com/@types/mdast/-/mdast-3.0.10.tgz#4724244a82a4598884cbbe9bcfd73dff927ee8af"
@@ -7563,6 +7575,11 @@ locate-path@^6.0.0:
75637575 dependencies:
75647576 p-locate "^5.0.0"
75657577
7578+ lodash-es@^4.17.21:
7579+ version "4.17.21"
7580+ resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.21.tgz#43e626c46e6591b7750beb2b50117390c609e3ee"
7581+ integrity sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==
7582+
75667583lodash.clonedeep@^4.5.0:
75677584 version "4.5.0"
75687585 resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef"
You can’t perform that action at this time.
0 commit comments