Skip to content

Commit

Permalink
Use a randomized 7-length ID
Browse files Browse the repository at this point in the history
  • Loading branch information
filipewl committed Nov 6, 2023
1 parent 538c399 commit 1766dfc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion react/components/Slider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const Slider: FC<Props> = ({
const controls = `${label
.toLowerCase()
.trim()
.replace(/ /g, '-')}-items-${Math.ceil(totalItems / Math.random())}`
.replace(/ /g, '-')}-items-${Math.random().toString(36).substring(2, 9)}`

Check failure on line 70 in react/components/Slider.tsx

View workflow job for this annotation

GitHub Actions / Lint

Replace `.toString(36)` with `⏎····.toString(36)⏎····`

const shouldShowArrows = Boolean(
(showNavigationArrows === 'always' ||
Expand Down

0 comments on commit 1766dfc

Please sign in to comment.