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, { useRef, useCallback, useState, forwardRef, useEffect } from 'react' | |
| import styles from './index.module.scss' | |
| const useLongPress = (delay = 400) => { | |
| const rafId = useRef() | |
| const startTime = useRef() | |
| const cancelRaf = () => { | |
| if (rafId.current) { |
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 useLongPress = (delay = 1000) => { | |
| let rafId = useRef() | |
| const startTime = useRef() | |
| const cancelRaf = () => { | |
| if (rafId.current) { | |
| cancelAnimationFrame(rafId.current) | |
| rafId.current = undefined | |
| startTime.current = undefined | |
| } |
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, { useState, useEffect, useCallback, useRef, useMemo, useTransition } from 'react' | |
| import PropTypes from 'prop-types' | |
| import styled from 'styled-components' | |
| import { uniqArray, structDataSource } from './helpers' | |
| import SkillsSearchResult from './skillsSeachResult' | |
| import SkillsSearch from './skillsSearch' | |
| import SkillsContent from './skillsContent' | |
| import SkillsBottom from './skillsBottom' | |
| export default function SkillsPicker({ |
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, { useEffect, useRef } from 'react' | |
| import styled from '@emotion/styled' | |
| import { | |
| IconChecked, | |
| FeaturePhone1, | |
| FeaturePhone2, | |
| FeaturePhone3, | |
| FeaturePhone4 | |
| } from 'client/helpers/images' | |
| import Button from 'client/components/common/Button/Button' |
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
| function CreateFootBarPortal({ children, id }) { | |
| let [el, setEl] = useState(null) | |
| useEffect(() => { | |
| let element = document.getElementById(id) | |
| if (!element) { | |
| element = document.createElement('div') | |
| element.setAttribute('id', id) | |
| document.body.appendChild(element) | |
| } |
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 dragDropExample = function () { | |
| let usingTouch = false; | |
| let startX = 0; | |
| let startY = 0; | |
| let isMoving = false; | |
| function pointX(e) { | |
| return usingTouch ? e.touches[0].clientX : e.clientX | |
| } |
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
| { | |
| "editor.tokenColorCustomizations": { | |
| "textMateRules": [ | |
| { | |
| "scope": [ | |
| "comment", | |
| "comment.block", | |
| "comment.block.documentation", | |
| "comment.line", | |
| "constant", |
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, { useState, useEffect, useRef } from 'react' | |
| import { Form, InputNumber, Col, Button, Select } from 'antd' | |
| import { MinusCircleOutlined, PlusCircleOutlined } from '@ant-design/icons' | |
| const country = [{ | |
| label: 'Germany', | |
| value: 'Germany' | |
| }, { | |
| label: 'Czechia', | |
| value: 'Czechia' |
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
| function groupArray(list, part) { | |
| let listRef = [...list] | |
| return list.reduce((curr) => { | |
| listRef.length && curr.push(listRef.splice(0, part)) | |
| return curr | |
| }, []) | |
| } |
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
| function groupArray(data, part = 100) { | |
| var result = [] | |
| var start = 0 | |
| var len = data.length | |
| for(var i = 0, len; i <= len; i++) { | |
| if(len - start < part) { | |
| result.push(data.slice(start, len)) | |
| break | |
| } | |
| else { |
NewerOlder