This file contains hidden or 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
type User | |
@model | |
@auth( | |
rules: [ | |
{ allow: owner } | |
{ allow: public, operations: [read], provider: iam } | |
] | |
) { | |
id: ID! | |
username: String! |
This file contains hidden or 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 Stripe from 'stripe'; | |
import { | |
validateCartItems, | |
formatLineItems, | |
} from 'use-shopping-cart/utilities'; | |
import inventory from './data/products.json'; | |
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY, { | |
apiVersion: '2020-08-27', | |
typescript: false, |
This file contains hidden or 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
# This "input" configures a global authorization rule to enable public access to | |
# all models in this schema. Learn more about authorization rules here: https://docs.amplify.aws/cli/graphql/authorization-rules | |
input AMPLIFY { | |
globalAuthRule: AuthRule = { allow: public } | |
} # FOR TESTING ONLY! | |
type User @model @auth(rules: [{ allow: owner }]) { | |
id: ID! | |
username: String! | |
likes: [Like] @hasMany | |
descriptionLikes: [DescriptionLike] @hasMany |
This file contains hidden or 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
{ | |
"id": { | |
"S": "f18b7f25-4e31-486e-877f-e079551c52ed" | |
}, | |
"city": { | |
"S": "Boston" | |
}, | |
"country": { | |
"S": "United States" | |
}, |
This file contains hidden or 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
{ | |
"Description": "S3 Resource for AWS Amplify CLI", | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Parameters": { | |
"env": { | |
"Type": "String" | |
}, | |
"bucketName": { | |
"Type": "String" | |
}, |
This file contains hidden or 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
/* Amplify Params - DO NOT EDIT | |
API_BTPAMPLIFY_GRAPHQLAPIENDPOINTOUTPUT | |
API_BTPAMPLIFY_GRAPHQLAPIIDOUTPUT | |
API_BTPAMPLIFY_GRAPHQLAPIKEYOUTPUT | |
API_BTPAMPLIFY_INTRODUCTIONREQUESTTABLE_ARN | |
API_BTPAMPLIFY_INTRODUCTIONREQUESTTABLE_NAME | |
AUTH_BTPAMPLIFYF619BFF1_USERPOOLID | |
ENV | |
REGION | |
Amplify Params - DO NOT EDIT */ |
This file contains hidden or 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 AWS = require('aws-sdk') | |
const faker = require('@faker-js/faker').faker | |
const docClient = new AWS.DynamoDB.DocumentClient({ | |
accessKeyId: process.env.DYNAMO_ACCESS_KEY, | |
secretAccessKey: process.env.DYNAMO_SECRET_KEY, | |
region: process.env.REGION, | |
params: { | |
TableName: process.env.TABLE_NAME | |
} |
This file contains hidden or 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, { 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 useCandidate from '../../hooks/use-candidate' | |
import { useAuth } from '../../context/auth' | |
import { Stepper as FormStepper } from 'react-form-stepper' | |
import JobDetails from '../../components/forms/JobDetails' | |
import JobHistory from '../../components/forms//JobHistory' | |
import PersonalInformation from '../../components/forms//PersonalInformation' |
This file contains hidden or 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, { 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' |
This file contains hidden or 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, { 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 |
NewerOlder