Title: eCommerce with the JAMStack
Description:
- Event details:
- Format: 2 days workshop (2 x 2h)
- Date & Time: ??
- Host: Nick DeJesus
import React, { useEffect } from "react"; | |
type PreviewProviderConfig = { | |
repoName: string; | |
children: React.ReactChild[] | React.ReactChild; | |
}; | |
// TODO: removeEventListener for when component unmounts | |
// TODO: No need for this to be a Provider, make it a component |
// column | |
const columns = React.useMemo( | |
() => [ | |
{ | |
id: 'expander', | |
accessor: '', | |
Header: ({ getToggleAllRowsExpandedProps, isAllRowsExpanded }) => ( | |
<span {...getToggleAllRowsExpandedProps()}> | |
{isAllRowsExpanded ? '👇' : '👉'} | |
</span> |
import { useReducer } from 'react' | |
import { Storage, API } from 'aws-amplify' | |
import { | |
createCandidate, | |
deleteCandidate, | |
updateCandidate | |
} from '../graphql/mutations' | |
import { getCandidateByUsername } from '../graphql/queries' | |
import { v4 as uuid } from 'uuid' | |
import config from '../aws-exports' |
const { Octokit } = require('@octokit/rest') | |
const CLIENT_MAP = require('../utils/client-map') | |
exports.handler = async function (event, context) { | |
try { | |
const { httpMethod, body } = event | |
if (httpMethod !== 'POST') { | |
return { | |
statusCode: 422, |
const { Octokit } = require('@octokit/rest') | |
const CLIENT_MAP = require('../utils/client-map') | |
exports.handler = async function (event, context) { | |
try { | |
const { queryStringParameters } = event | |
const companyName = CLIENT_MAP.get(queryStringParameters.code) | |
if (!companyName) { |
/** @jsxImportSource theme-ui */ | |
import Layout from '../components/layout' | |
import { useAuth } from '../context/auth' | |
import { | |
Box, | |
Label, | |
Input, | |
Select, | |
Textarea, | |
Radio, |
import * as React from "react"; | |
import { useMemo } from "react"; | |
import { RichTextField } from "@prismicio/types"; | |
import { asText } from "@prismicio/helpers"; | |
export type PrismicTextProps = { | |
field: RichTextField; | |
separator?: string; | |
}; |
(function () { | |
"use-strict"; | |
var style = { | |
base: { | |
// Add your base input styles here. For example: | |
fontSize: "16px", | |
color: "#32325d", | |
}, | |
}; |
app.post("/charge", async function (req, res) { | |
const { | |
email, | |
stripeToken, | |
address, | |
name, | |
city, | |
state, | |
zip, | |
country, |