Skip to content

Instantly share code, notes, and snippets.

View luismec90's full-sized avatar
😎

Luis Montoya luismec90

😎
View GitHub Profile
{
"shipping_method": 6,
"recipient": {
"name": "Caron Proschan",
"address": {
"address1": "1598 Shrader",
"address2": "",
"city": "San francisco",
"state": "California",
"country": "US",
[2021-08-17 13:35:49] production.INFO: GuzzleHttp\Psr7\Response Object
(
[reasonPhrase:GuzzleHttp\Psr7\Response:private] => OK
[statusCode:GuzzleHttp\Psr7\Response:private] => 200
[headers:GuzzleHttp\Psr7\Response:private] => Array
(
[Access-Control-Allow-Credentials] => Array
(
[0] => true
)
[2021-08-12 11:23:35] production.INFO: handle
[2021-08-12 11:23:35] production.INFO: GuzzleHttp\Psr7\Response Object
(
[reasonPhrase:GuzzleHttp\Psr7\Response:private] => OK
[statusCode:GuzzleHttp\Psr7\Response:private] => 200
[headers:GuzzleHttp\Psr7\Response:private] => Array
(
[Access-Control-Allow-Credentials] => Array
(
[0] => true
import React, { useState, useEffect } from 'react';
import gql from 'graphql-tag';
import { Query } from 'react-apollo';
import { sortable } from 'react-sortable';
import SelectAutoComplete from '../../../common/SelectAutoComplete';
import { ButtonSmall } from '../../../styles/theme';
const GET_ALL_CATEGORIES = gql`
query getAllCategories {
getAllCategories {
@luismec90
luismec90 / test.graphql
Last active February 15, 2019 19:17
graphQL CRUD operations on client
mutation createColor {
createColor(name: "Blue") {
id
name
created_at
updated_at
}
}
mutation updateColor {
import React, { useEffect, useState } from 'react';
import { connect } from 'react-redux';
import { ToastContainer, toast } from 'react-toastify';
import { withRouter } from 'react-router-dom';
import Navigation from './common/Navigation';
import Sidebar from './common/Sidebar';
import Footer from './common/Footer';
import NProgress from 'nprogress';
import TopBarProgress from 'react-topbar-progress-indicator';
import { SET_YOTPO_REVIEWS } from '../action-constants/yotpo';
export const reducerKey = 'yotpo';
const initialState = {
reviews: [],
};
export default (state = initialState, action) => {
switch (action.type) {
import axios from 'axios'
import { yotpoApiKey } from 'shared/Constants';
import assetUrl from 'shared/components/AssetUrl';
export const getYotpopReviews = (productId) => {
return axios.get('https://api.yotpo.com/v1/widget/' + yotpoApiKey + '/products/' + productId + '/reviews.json');
}
import React, { Component } from 'react';
import { withRouter } from 'react-router'
import { connect } from 'react-redux';
import { compose } from 'redux';
import styled from 'styled-components';
import Flex from 'shared/components/Flex';
const Container = styled(Flex)`
width: 100%;
`;
<?php
$header = [
'Accept: application/json',
"Api-Appid:XXX",
"Api-Key:XXX",
];
$contact = [
'objectID' => 0,