This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from "react"; | |
/** | |
* Component o'zidan tashqari bosilsa log chiqaradi | |
*/ | |
export default class OutsideAlerter extends Component { | |
constructor(props) { | |
super(props); | |
this.wrapperRef = React.createRef(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getFixedLengthRandomnumber = fixed_digit => (String(Math.round(Math.random() * (10**fixed_digit))).padEnd(fixed_digit, '0') - 0) | |
getFixedLengthRandomnumber(6) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const shuffleArray = (arr) => { | |
const copyArr = [...arr] | |
return copyArr.sort(() => Math.random() - 0.5) | |
} |
NewerOlder