Skip to content

Instantly share code, notes, and snippets.

View maiordom's full-sized avatar

Vadim Zhulanov maiordom

View GitHub Profile
scalar Date
scalar File
scalar Url
schema {
query: Query
}
type Query {
me: User!
export const whatsappButton = {
title: {
repeat: 'Повторить через WhatsApp',
ask: 'Спросить в WhatsApp',
book: 'Записаться через WhatsApp',
continue: 'Продолжить в WhatsApp'
},
serviceDetail: {
message: {
error: 'Что-то пошло не так. Но это не страшно.\nАдминистратор ждет вас в чате',
const handleError = (err: AxiosError): Promise<ISignUpResponse> => {
if (!err.response) {
return Promise.reject({
error: {
code: 'UnresolvedError',
fields: [],
description: i18n.t('common:error.unresolvedError')
}
});
}
import * as isEmpty from 'lodash/isEmpty';
import { createAction } from '4game-core/utils/createAction';
import * as ShopService from 'src/services/Shop';
import { IAction } from '4game-core/types/IAction';
import { IOption } from '4game-core/types/IOption';
import { IProductCard } from '4game-core/store/ShopService';
import { IGetWebshopUserProducts } from 'src/services/Shop';
import { createAction } from 'src/utils/createAction';
import * as ShopService from 'src/services/Shop';
import { IAction } from 'src/types/IAction';
import { IGetWebshopUserProducts } from 'src/services/Shop';
import { IOption } from 'src/types/IOption';
import { IShopCategory } from 'src/store/ShopCategories';
import { IWebShopServices } from 'src/types/IWebShopServices';
interface ISetProductsParams {
import { handleActions } from 'redux-actions';
import * as find from 'lodash/find';
import * as each from 'lodash/each';
import * as a from 'src/actions/Shop';
import { IWebShopServices, IWebShopService } from 'src/types/IWebShopServices';
import { IProductCard, IShopService, IShopServices } from 'src/store/ShopService';
import { IShopCategory } from 'src/store/ShopCategories';
// @flow
import * as ProfileService from '../services/Profile';
import constants from '../constants/Profile';
export const getUserProfile = () => (dispatch: Function, getState: Function) => {
const auth = getState().auth;
return ProfileService.getUserProfile({
@maiordom
maiordom / .styl
Created March 6, 2016 20:55
stylus style
@import 'nib'
/* =======================
------- iSlider -------
======================= */
b = '.islider'
{b}
position relative
Теоретическая часть:
1) ES6
https://ponyfoo.com/articles/es6
https://github.com/lukehoban/es6features
2) Babel
http://babeljs.io
http://browserify.org
@maiordom
maiordom / region.after.js
Created October 1, 2014 10:29
simple refactoring №3
(function( $ ) {
'use strict';
var ElementRegion = function( $el ) {
this.cacheObjects( $el );
this.bindEvents();
};
ElementRegion.prototype = {
cacheObjects: function( $el ) {