Skip to content

Instantly share code, notes, and snippets.

Avatar

Nick Toye NickToye

View GitHub Profile
View gist:31a8d1614841b5ace2baaafcda021be3
var sofologyLogin = (function () {
function logInExistingUser(form, email, password, optInMarketing) {
var deferred = new $.Deferred();
hybrisModule.submitLogin(email.val(), password.val(), optInMarketing).then(function (res) {
hybrisModule.retrieveUsersBasket().then(function (res) {
return deferred.resolve({ success: true, response: res });
});
})
.fail(function (res) {
View gist:ed63428c7549254392cafc0078e17adf
import React from "react";
import PropTypes from "prop-types";
import { withStyles } from "@material-ui/core/styles";
import BottomNavigation from "@material-ui/core/BottomNavigation";
import BottomNavigationAction from "@material-ui/core/BottomNavigationAction";
import RestoreIcon from "@material-ui/icons/Restore";
import FavoriteIcon from "@material-ui/icons/Favorite";
import LocationOnIcon from "@material-ui/icons/LocationOn";
const styles = {
View gist:8c2866afe514f393921c2bdd90bae444
import React, { Component } from 'react';
import { MuiThemeProvider, createMuiTheme } from '@material-ui/core/styles';
import CssBaseline from '@material-ui/core/CssBaseline';
import DeliveryManagementTable from './components/DeliveryManagementTable';
import BottomNav from "./components/BottomNav";
View gist:af79e50188ed164410b472765d2d3d2d
import React, { Component } from 'react';
import { MuiThemeProvider, createMuiTheme } from '@material-ui/core/styles';
import CssBaseline from '@material-ui/core/CssBaseline';
import DeliveryManagementTable from './components/DeliveryManagementTable';
// import BottomNav from "./components/BottomNav";
View gist:54bf12845dc9ae58af041c1f9935718e
import React, { Component } from 'react';
import { MuiThemeProvider, createMuiTheme } from '@material-ui/core/styles';
import CssBaseline from '@material-ui/core/CssBaseline';
import DeliveryManagementTable from './components/DeliveryManagementTable';
import TemporaryDrawer from './components/TemporaryDrawer';
View gist:f2ef1e9913078ce2603d806f8c113ffa
class DeliveryRow extends React.Component {
constructor(props) {
super(props);
this.state = {
isBookable: this.props.isBookable,
isBooked: this.props.isBooked,
bookedDate: this.props.details.booked_date,
};
this.updateBookable = this.updateBookable.bind(this);
View gist:06f9a257550763c61a3e36dceb9aff54
{
"teams": [
{
"_links": {
"self": {
"href": "http://api.football-data.org/v1/teams/808"
},
"fixtures": {
"href": "http://api.football-data.org/v1/teams/808/fixtures"
},
View gist:2b9cb4235c3f9c9892d17f9c32398249
render() {
const details = this.props.details;
const paletteType = this.props.details.section;
return (
<div key={details.key}>
<h2>This is {paletteType} palette</h2>
<div className="o-grid o-grid--centre o-grid--start o-grid--auto">
{Object.keys(this.state.colours)
.filter(function(filteredSwatches) {
return colours[filteredSwatches].colourType === paletteType;
You can’t perform that action at this time.