Skip to content

Instantly share code, notes, and snippets.

@tobernguyen
tobernguyen / index.js
Created April 29, 2018 18:15
Get list of all users in Telegram channel / supergroup
/*
* MIT License
*
* Copyright (c) 2017-2018 Bannerets <save14@protonmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
import React from 'react';
import PropTypes from 'prop-types';
import Immutable from 'immutable';
import styled from 'styled-components';
import { Link } from 'react-router';
import ViewBranchListPanel from '../../components/ViewBranchListPanel';
import './styles.scss';
const TableList = styled.ul`
padding-left: 0;
import { createSelector } from 'reselect';
const selectMenusDomain = () => (state) => state.get('menus');
const selectRestaurantMenus = () => createSelector(
selectMenusDomain(),
(menusState) => menusState.get('menus')
);
const selectActiveMenu = () => createSelector(
import { fromJS, List } from 'immutable';
import camelize from 'camelize';
import {
GET_RESTAURANT_MENUS_REQUEST,
GET_RESTAURANT_MENUS_SUCCESS,
GET_RESTAURANT_MENUS_ERROR,
SET_ACTIVE_MENU_CONTAINER_ID,
SET_ACTIVE_MENU_ITEM_ID,
PUT_UPDATE_MENU_CONTAINER_REQUEST,
PUT_UPDATE_MENU_CONTAINER_SUCCESS,
import { fromJS } from 'immutable';
import {
SIGN_IN_BY_EMAIL_REQUEST,
SIGN_IN_BY_EMAIL_SUCCESS,
SIGN_IN_BY_EMAIL_ERROR,
} from './constants';
const initialState = fromJS({
error: null,
user: null,