Skip to content

Instantly share code, notes, and snippets.

View xamedow's full-sized avatar
🏠
Working from home

Andrey Khamedov xamedow

🏠
Working from home
View GitHub Profile
@xamedow
xamedow / index.tsx
Created October 4, 2022 14:58
Slider implementation
import React, {
Children,
cloneElement,
ReactElement,
useContext,
useEffect,
useRef,
useState,
} from 'react';
import classNames from 'classnames/bind';
@xamedow
xamedow / README.md
Created October 20, 2020 14:22
UULA test app description

Uula Frontend Test Application

Your task is to create comments section component with ability for the client to create/read/update/delete/like/dislike/complain comments

Comments section should be located at the comment page of the app '/comments'

Initially you should request a list of existing comments at the API endpoint and if there are none - show empty list placeholder

Each comment could be unfolded and show a list of replies if any, replies should be also provided with CRUD controls

Uula Frontend Test Application

Your task is to create comments section component with ability for the client to create/read/update/delete/like/dislike/complain comments

Comments section should be located at the comment page of the app '/comments'

Initially you should request a list of existing comments at the API endpoint and if there are none - show empty list placeholder

Each comment could be unfolded and show a list of replies if any, replies should be also provided with CRUD controls

@xamedow
xamedow / README.md
Created October 20, 2020 14:14
UULA-test-app

Uula Frontend Test Application

Your task is to create comments section component with ability for the client to create/read/update/delete/like/dislike/complain comments

Comments section should be located at the comment page of the app '/comments'

Initially you should request a list of existing comments at the API endpoint and if there are none - show empty list placeholder

Each comment could be unfolded and show a list of replies if any, replies should be also provided with CRUD controls

const createDocumentToAPI = (appID: string) => {
utils.api.setBaseURL(`${BASE_API_URL}:${DOCUMENTS_PORT}`);
const headers = {
...defaultHeaders,
'Content-Type': 'multipart/form-data;'
};
const formData = new FormData();
@xamedow
xamedow / gist:a01782da3c0db52be4c3c0f24bed591e
Created January 14, 2020 12:51
Validator helper functions
import {
__,
anyPass,
always,
allPass,
compose,
contains,
converge,
curry,
drop,
import React from 'react';
import PropTypes from 'prop-types';
import { Field } from 'react-final-form';
import { useSpring, animated } from 'react-spring';
interface IProps extends React.HTMLProps<HTMLElement> {
when: string;
equal?: string | boolean;
isIn?: {};
cb?: any;
@xamedow
xamedow / validators.test.ts
Created August 21, 2019 05:50
final form validators
import {
applyValidators,
isCyrillic,
isEmail,
isEntityOgrnValid,
isEntityINNValid,
isIeOgrnValid,
isIEINNValid,
required,
isPassword,
@xamedow
xamedow / Condition.tsx
Created August 18, 2019 21:10
Final form condition animated component with leave staet and translate animation
import React from "react";
import { Field } from "react-final-form";
import { useTransition, animated } from "react-spring";
import styled from "styled-components";
interface Props extends React.HTMLProps<HTMLElement> {
when: string;
is: any;
}
@xamedow
xamedow / Condition.tsx
Last active August 18, 2019 21:01
Final form animated condition component
import React from "react";
import { Field } from "react-final-form";
import { useSpring, animated } from "react-spring";
interface Props extends React.HTMLProps<HTMLElement> {
when: string;
is: any;
}
interface InnerProps {