Skip to content

Instantly share code, notes, and snippets.

View AdamZaczek's full-sized avatar

Adam Żaczek AdamZaczek

View GitHub Profile
@AdamZaczek
AdamZaczek / UgliestVideoComponent.js
Last active February 9, 2021 11:02
It works I guess
import React, { useEffect, useRef, PureComponent } from 'react'
import AgoraRTC from 'agora-rtc-sdk'
import styled from 'styled-components/macro'
import { VideoCameraOutlined } from '@ant-design/icons'
import { AudioOutlined } from '@ant-design/icons'
import { PhoneOutlined } from '@ant-design/icons'
import SmallSpinner from 'components/smallSpinner'
import CircularProgress from '@material-ui/core/CircularProgress'
const StyledVideo = styled.video`
{
"cbf8c5b2-92a9-4f56-b266-8f6b081ae4c0": {
"id": "cbf8c5b2-92a9-4f56-b266-8f6b081ae4c0",
"status": "Active",
"visibility": false,
"purchaseDate": "2020-05-13T09:21:34.000Z",
"activationDate": "2020-05-13T09:21:34.000Z",
"lastAnniversaryDate": "2020-05-19T11:21:34.000Z",
"anniversaryDate": "2020-05-19T12:21:34.000Z",
"specificationType": "MXXPRODUCT",
{
"id": 3,
"state": {
"configuration": {
"isLocationServicesEnabled": true,
"roamingIntroStatus": true,
"isEcoTutorialShowed": false,
"isEduTutorialShowed": false,
"language": "en",
"fullLanguage": "en-US",
it('should return iMList once fetched', () => {
const action = {
type: FETCH_IM_LIST_SUCCESS,
payload: {
data: {
ok: true,
ims: [
{
id: "D4VAKS265",
created: 1491558944,
@AdamZaczek
AdamZaczek / GraphQL9.js
Created April 25, 2017 23:33
GraphQL Getting Started Code Fragment 9
const SkillLevel = new GraphQLObjectType({
name: 'SkillLevel',
description: 'Describes how well user knows certain skill.',
fields: () => ({
_id: { type: GraphQLString },
level: {
type: GraphQLInt,
description: 'Actual skill level, ranked from 1 to 3'
},
favorite: { type: GraphQLBoolean },
@AdamZaczek
AdamZaczek / GraphQL8.js
Created April 25, 2017 23:32
GraphQL Getting Started Code Fragment 8
const Skill = new GraphQLObjectType({
name: 'Skill',
description: 'Represents skill',
fields: () => ({
_id: { type: GraphQLString },
name: { type: GraphQLString },
skillLevels: {
type: new GraphQLList(SkillLevel),
description: 'Returns list of levels corrsponding to the skill. It is similar to list of grades for a certain subject in school',
resolve: (skill) => {
@AdamZaczek
AdamZaczek / GraphQL7.js
Created April 25, 2017 23:31
GraphQL Getting Started Code Fragment 7
const User = new GraphQLObjectType({
name: 'User',
description: 'Represents user',
fields: () => ({
_id: { type: GraphQLString },
firstName: { type: GraphQLString },
lastName: { type: GraphQLString },
role: { type: GraphQLString },
skillLevels: {
type: new GraphQLList(SkillLevel),
@AdamZaczek
AdamZaczek / GraphQL6.js
Created April 25, 2017 23:16
GraphQL Getting Started Code Fragment 6
const Skill = new GraphQLObjectType({
name: 'Skill',
description: 'Represents skill',
fields: () => ({
_id: { type: GraphQLString },
name: { type: GraphQLString }
})
});
const SkillLevel = new GraphQLObjectType({
@AdamZaczek
AdamZaczek / GraphQL5.js
Created April 25, 2017 23:15
GraphQL Getting Started Code Fragment 5
import {
GraphQLList,
GraphQLObjectType,
GraphQLSchema,
GraphQLString,
GraphQLBoolean,
GraphQLInt
} from 'graphql';
@AdamZaczek
AdamZaczek / GraphQL4.js
Created April 25, 2017 23:14
GraphQL Getting Started Code Fragment 4
/* eslint no-underscore-dangle: off*/
/* eslint "arrow-body-style": off */
import {
GraphQLList,
GraphQLObjectType,
GraphQLSchema,
GraphQLString,
} from 'graphql';