Title: eCommerce with the JAMStack
Description:
- Event details:
- Format: 2 days workshop (2 x 2h)
- Date & Time: ??
- Host: Nick DeJesus
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; | |
}; |
/** @jsxImportSource theme-ui */ | |
import Layout from '../components/layout' | |
import { useAuth } from '../context/auth' | |
import { | |
Box, | |
Label, | |
Input, | |
Select, | |
Textarea, | |
Radio, |
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) { |
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, |
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' |
// column | |
const columns = React.useMemo( | |
() => [ | |
{ | |
id: 'expander', | |
accessor: '', | |
Header: ({ getToggleAllRowsExpandedProps, isAllRowsExpanded }) => ( | |
<span {...getToggleAllRowsExpandedProps()}> | |
{isAllRowsExpanded ? '👇' : '👉'} | |
</span> |
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 |
import React, { useState, useRef, useEffect } from 'react' | |
import { Box, Flex, Button, Text, Input } from 'theme-ui' | |
import { useFieldArray, useFormContext } from 'react-hook-form' | |
function ContributionInput() { | |
const { trigger, control, register } = useFormContext() | |
const { fields, append, remove } = useFieldArray({ | |
name: 'contributions', | |
control |
import React, { useState, useEffect } from 'react' | |
import { FormProvider, useForm } from 'react-hook-form' | |
import { Box, Button, Container, Flex, Heading, Spinner, Text } from 'theme-ui' | |
import Layout from '../../components/layout' | |
import { | |
personalInfoFormMap, | |
jobDetailsFormMap, | |
jobHistoryFormMap | |
} from '../../components/forms/formMaps' | |
import useCandidate from '../../hooks/use-candidate' |