This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import useLogin from "@zego/hooks/useLogin"; | |
import BaseLoginForm from "./BaseLoginForm"; | |
import { withTrackableFeature } from "@zego/tracking"; | |
const LoginFormImpl = props => { | |
const login = useLogin(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { include, createRouter } from "./lib/router"; | |
const commonRoutes = [ | |
{ | |
path: "/terms-of-business/", | |
name: "terms-of-business", | |
page: "TermsOfBusinessPage", | |
}, | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { routes, include } from "@framework/router"; | |
import { relayView, xmlView } from "@framework/engine"; | |
const gbRoutes = routes( | |
route({ path: "/", view: "./views/gb/HomepageGb" }), | |
route({ path: "/scooter/", view: "./views/gb/ScooterGb" }), | |
route({ path: "/car/", view: "./views/gb/CarGb" }), | |
route({ path: "/private-hire/", view: "./views/gb/PrivateHireGb" }), | |
route({ path: "/blog/:slug/", view: "./views/BlogPost" }) | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path'); | |
const { createFileNode } = require(`gatsby-source-filesystem/create-file-node`); | |
async function createLocaleFileNode(filePath, createNode, createNodeId) { | |
// HACKITY HACK HACK | |
const fileNode = await createFileNode( | |
path.resolve(__dirname, filePath), | |
createNodeId | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Interpose separator={<Hairline />}> | |
{products.map(products => <ProductListItem product={product} key={product.id} />)} | |
</Interpose> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @flow | |
import { PureComponent } from 'react'; | |
import { graphql, createFragmentContainer } from 'react-relay'; | |
import FormatCurrency from '@zego/components/FormatCurrency'; | |
import { type Price_price } from './__generated__/Price_price.graphql'; | |
type Props = { | |
price: Price_price, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const authRequired = resolver => (obj, args, context, info) => { | |
if (!context.user) { | |
return new UserError('Authentication Required'); | |
} | |
return resolver(obj, args, context, info); | |
} | |
const myResolver = authRequired((obj, args, context, info) => { | |
// Normal logic | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { makeExecutableSchema } from "graphql-tools"; | |
import RawSchema from "./RawSchema"; | |
import nodeResolver from "./nodeResolver"; | |
import * as graphQLModules from "glob:./**/*.graphql.js"; | |
const schema = new RawSchema(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default schema => { | |
schema.define` | |
type Venue implements Node { | |
id: ID! | |
name: String! | |
address1: String | |
address2: String | |
description: String | |
postalCode: String | |
location: Point |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const App = () => <Typography baseLine="24" baseSize="16" scale="classic" render={ | |
typeComponents => md(typeComponents)` | |
# this will be a custom header | |
[custom link component](/url/to/link)` | |
} />; |