forked from wesbos/Advanced-React
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
286 changed files
with
127,110 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
CLOUDINARY_CLOUD_NAME="wesbostutorial" | ||
CLOUDINARY_KEY=533361239534275 | ||
CLOUDINARY_SECRET="kbaSqvDE-3i9MZ61aOaBGOXvF6U" | ||
COOKIE_SECRET="litterallly amnytohmgasdfasdfasd" | ||
DATABASE_URL=mongodb+srv://sick:[email protected]/sickfits?retryWrites=true&w=majority | ||
STRIPE_SECRET="sk_test_n3YElivem4bTsQsgL4T1MJzl" | ||
MAIL_HOST="smtp.ethereal.email" | ||
MAIL_PORT=587 | ||
MAIL_USER="[email protected]" | ||
MAIL_PASS="YG58hGxP3dfv4KFnCR" | ||
FRONTEND_URL="http://localhost:7777" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/// <reference types="next" /> | ||
/// <reference types="next/types/global" /> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// this file is copied somewhere else so this lint rule is incorrect | ||
// eslint-disable-next-line import/no-extraneous-dependencies | ||
module.exports = require('@keystone-next/admin-ui/next-config').config; |
215 changes: 215 additions & 0 deletions
215
finished-application/backend/.keystone/admin/pages/_app.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,215 @@ | ||
import React from 'react'; | ||
|
||
import { KeystoneProvider } from '@keystone-next/admin-ui/context'; | ||
import { ErrorBoundary } from '@keystone-next/admin-ui/components'; | ||
import { Core } from '@keystone-ui/core'; | ||
|
||
import * as view560cabf3 from '../../../node_modules/@keystone-next/fields/types/mongoId/views'; | ||
import * as view16694b61 from '../../../node_modules/@keystone-next/fields/types/text/views'; | ||
import * as view55d64535 from '../../../node_modules/@keystone-next/fields/types/password/views'; | ||
import * as viewc7929eae from '../../../node_modules/@keystone-next/fields/types/relationship/views'; | ||
import * as view7113ccba from '../../../node_modules/@keystone-next/fields/types/timestamp/views'; | ||
import * as view3d5d0700 from '../../../node_modules/@keystone-next/fields/types/select/views'; | ||
import * as view6f3ff6de from '../../../node_modules/@keystone-next/fields/types/integer/views'; | ||
import * as view428baecd from '../../../node_modules/@keystone-next/cloudinary/views'; | ||
import * as viewe125cccc from '../../../node_modules/@keystone-next/fields/types/virtual/views'; | ||
import * as view04b457d0 from '../../../node_modules/@keystone-next/fields/types/checkbox/views'; | ||
|
||
const adminConfig = {}; | ||
|
||
const fieldViews = { | ||
view560cabf3, | ||
view16694b61, | ||
view55d64535, | ||
viewc7929eae, | ||
view7113ccba, | ||
view3d5d0700, | ||
view6f3ff6de, | ||
view428baecd, | ||
viewe125cccc, | ||
view04b457d0, | ||
}; | ||
|
||
const lazyMetadataQuery = { | ||
kind: 'Document', | ||
definitions: [ | ||
{ | ||
kind: 'OperationDefinition', | ||
operation: 'query', | ||
selectionSet: { | ||
kind: 'SelectionSet', | ||
selections: [ | ||
{ | ||
kind: 'Field', | ||
name: { | ||
kind: 'Name', | ||
value: 'keystone', | ||
loc: { start: 22, end: 30 }, | ||
}, | ||
arguments: [], | ||
directives: [], | ||
selectionSet: { | ||
kind: 'SelectionSet', | ||
selections: [ | ||
{ | ||
kind: 'Field', | ||
name: { | ||
kind: 'Name', | ||
value: 'adminMeta', | ||
loc: { start: 39, end: 48 }, | ||
}, | ||
arguments: [], | ||
directives: [], | ||
selectionSet: { | ||
kind: 'SelectionSet', | ||
selections: [ | ||
{ | ||
kind: 'Field', | ||
name: { | ||
kind: 'Name', | ||
value: 'lists', | ||
loc: { start: 59, end: 64 }, | ||
}, | ||
arguments: [], | ||
directives: [], | ||
selectionSet: { | ||
kind: 'SelectionSet', | ||
selections: [ | ||
{ | ||
kind: 'Field', | ||
name: { | ||
kind: 'Name', | ||
value: 'key', | ||
loc: { start: 77, end: 80 }, | ||
}, | ||
arguments: [], | ||
directives: [], | ||
loc: { start: 77, end: 80 }, | ||
}, | ||
{ | ||
kind: 'Field', | ||
name: { | ||
kind: 'Name', | ||
value: 'isHidden', | ||
loc: { start: 91, end: 99 }, | ||
}, | ||
arguments: [], | ||
directives: [], | ||
loc: { start: 91, end: 99 }, | ||
}, | ||
{ | ||
kind: 'Field', | ||
name: { | ||
kind: 'Name', | ||
value: 'fields', | ||
loc: { start: 110, end: 116 }, | ||
}, | ||
arguments: [], | ||
directives: [], | ||
selectionSet: { | ||
kind: 'SelectionSet', | ||
selections: [ | ||
{ | ||
kind: 'Field', | ||
name: { | ||
kind: 'Name', | ||
value: 'path', | ||
loc: { start: 131, end: 135 }, | ||
}, | ||
arguments: [], | ||
directives: [], | ||
loc: { start: 131, end: 135 }, | ||
}, | ||
{ | ||
kind: 'Field', | ||
name: { | ||
kind: 'Name', | ||
value: 'createView', | ||
loc: { start: 148, end: 158 }, | ||
}, | ||
arguments: [], | ||
directives: [], | ||
selectionSet: { | ||
kind: 'SelectionSet', | ||
selections: [ | ||
{ | ||
kind: 'Field', | ||
name: { | ||
kind: 'Name', | ||
value: 'fieldMode', | ||
loc: { start: 175, end: 184 }, | ||
}, | ||
arguments: [], | ||
directives: [], | ||
loc: { start: 175, end: 184 }, | ||
}, | ||
], | ||
loc: { start: 159, end: 198 }, | ||
}, | ||
loc: { start: 148, end: 198 }, | ||
}, | ||
], | ||
loc: { start: 117, end: 210 }, | ||
}, | ||
loc: { start: 110, end: 210 }, | ||
}, | ||
], | ||
loc: { start: 65, end: 220 }, | ||
}, | ||
loc: { start: 59, end: 220 }, | ||
}, | ||
], | ||
loc: { start: 49, end: 228 }, | ||
}, | ||
loc: { start: 39, end: 228 }, | ||
}, | ||
], | ||
loc: { start: 31, end: 234 }, | ||
}, | ||
loc: { start: 22, end: 234 }, | ||
}, | ||
{ | ||
kind: 'Field', | ||
name: { kind: 'Name', value: 'authenticatedItem' }, | ||
selectionSet: { | ||
kind: 'SelectionSet', | ||
selections: [ | ||
{ | ||
kind: 'InlineFragment', | ||
typeCondition: { | ||
kind: 'NamedType', | ||
name: { kind: 'Name', value: 'User' }, | ||
}, | ||
selectionSet: { | ||
kind: 'SelectionSet', | ||
selections: [ | ||
{ kind: 'Field', name: { kind: 'Name', value: 'id' } }, | ||
{ kind: 'Field', name: { kind: 'Name', value: 'name' } }, | ||
], | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
], | ||
}; | ||
|
||
export default function App({ Component, pageProps }) { | ||
return ( | ||
<Core> | ||
<KeystoneProvider | ||
adminConfig={adminConfig} | ||
adminMetaHash="13qpsj8" | ||
fieldViews={fieldViews} | ||
lazyMetadataQuery={lazyMetadataQuery} | ||
> | ||
<ErrorBoundary> | ||
<Component {...pageProps} /> | ||
</ErrorBoundary> | ||
</KeystoneProvider> | ||
</Core> | ||
); | ||
} |
5 changes: 5 additions & 0 deletions
5
finished-application/backend/.keystone/admin/pages/api/__keystone_api_build.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export { default as config } from '../../../../keystone'; | ||
|
||
export default function (req, res) { | ||
return res.status(500); | ||
} |
7 changes: 7 additions & 0 deletions
7
finished-application/backend/.keystone/admin/pages/cart-items/[id].js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import React from 'react'; | ||
|
||
import { ItemPage } from '@keystone-next/admin-ui/pages/ItemPage'; | ||
|
||
export default function Item() { | ||
return <ItemPage listKey="CartItem" />; | ||
} |
7 changes: 7 additions & 0 deletions
7
finished-application/backend/.keystone/admin/pages/cart-items/index.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import React from 'react'; | ||
|
||
import { ListPage } from '@keystone-next/admin-ui/pages/ListPage'; | ||
|
||
export default function List() { | ||
return <ListPage listKey="CartItem" />; | ||
} |
49 changes: 49 additions & 0 deletions
49
finished-application/backend/.keystone/admin/pages/index.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import React from 'react'; | ||
|
||
import { HomePage } from '@keystone-next/admin-ui/pages/HomePage'; | ||
import { gql } from '@keystone-next/admin-ui/apollo'; | ||
|
||
export default function Home() { | ||
return ( | ||
<HomePage | ||
query={gql` | ||
query { | ||
keystone { | ||
adminMeta { | ||
lists { | ||
key | ||
fields { | ||
path | ||
createView { | ||
fieldMode | ||
} | ||
} | ||
} | ||
} | ||
} | ||
User: _allUsersMeta { | ||
count | ||
} | ||
Product: _allProductsMeta { | ||
count | ||
} | ||
ProductImage: _allProductImagesMeta { | ||
count | ||
} | ||
CartItem: _allCartItemsMeta { | ||
count | ||
} | ||
OrderItem: _allOrderItemsMeta { | ||
count | ||
} | ||
Order: _allOrdersMeta { | ||
count | ||
} | ||
Role: _allRolesMeta { | ||
count | ||
} | ||
} | ||
`} | ||
/> | ||
); | ||
} |
15 changes: 15 additions & 0 deletions
15
finished-application/backend/.keystone/admin/pages/init.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { InitPage } from '@keystone-next/auth/pages/InitPage'; | ||
import React from 'react'; | ||
import { gql } from '@keystone-next/admin-ui/apollo'; | ||
|
||
const fieldPaths = ['name', 'email', 'password']; | ||
|
||
export default function Init() { | ||
return ( | ||
<InitPage | ||
listKey="User" | ||
fieldPaths={fieldPaths} | ||
showKeystoneSignup={true} | ||
/> | ||
); | ||
} |
7 changes: 7 additions & 0 deletions
7
finished-application/backend/.keystone/admin/pages/no-access.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import React from 'react'; | ||
|
||
import { NoAccessPage } from '@keystone-next/admin-ui/pages/NoAccessPage'; | ||
|
||
export default function Home() { | ||
return <NoAccessPage sessionsEnabled={true} />; | ||
} |
7 changes: 7 additions & 0 deletions
7
finished-application/backend/.keystone/admin/pages/order-items/[id].js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import React from 'react'; | ||
|
||
import { ItemPage } from '@keystone-next/admin-ui/pages/ItemPage'; | ||
|
||
export default function Item() { | ||
return <ItemPage listKey="OrderItem" />; | ||
} |
7 changes: 7 additions & 0 deletions
7
finished-application/backend/.keystone/admin/pages/order-items/index.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import React from 'react'; | ||
|
||
import { ListPage } from '@keystone-next/admin-ui/pages/ListPage'; | ||
|
||
export default function List() { | ||
return <ListPage listKey="OrderItem" />; | ||
} |
7 changes: 7 additions & 0 deletions
7
finished-application/backend/.keystone/admin/pages/orders/[id].js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import React from 'react'; | ||
|
||
import { ItemPage } from '@keystone-next/admin-ui/pages/ItemPage'; | ||
|
||
export default function Item() { | ||
return <ItemPage listKey="Order" />; | ||
} |
7 changes: 7 additions & 0 deletions
7
finished-application/backend/.keystone/admin/pages/orders/index.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import React from 'react'; | ||
|
||
import { ListPage } from '@keystone-next/admin-ui/pages/ListPage'; | ||
|
||
export default function List() { | ||
return <ListPage listKey="Order" />; | ||
} |
7 changes: 7 additions & 0 deletions
7
finished-application/backend/.keystone/admin/pages/product-images/[id].js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import React from 'react'; | ||
|
||
import { ItemPage } from '@keystone-next/admin-ui/pages/ItemPage'; | ||
|
||
export default function Item() { | ||
return <ItemPage listKey="ProductImage" />; | ||
} |
7 changes: 7 additions & 0 deletions
7
finished-application/backend/.keystone/admin/pages/product-images/index.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import React from 'react'; | ||
|
||
import { ListPage } from '@keystone-next/admin-ui/pages/ListPage'; | ||
|
||
export default function List() { | ||
return <ListPage listKey="ProductImage" />; | ||
} |
7 changes: 7 additions & 0 deletions
7
finished-application/backend/.keystone/admin/pages/products/[id].js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import React from 'react'; | ||
|
||
import { ItemPage } from '@keystone-next/admin-ui/pages/ItemPage'; | ||
|
||
export default function Item() { | ||
return <ItemPage listKey="Product" />; | ||
} |
7 changes: 7 additions & 0 deletions
7
finished-application/backend/.keystone/admin/pages/products/index.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import React from 'react'; | ||
|
||
import { ListPage } from '@keystone-next/admin-ui/pages/ListPage'; | ||
|
||
export default function List() { | ||
return <ListPage listKey="Product" />; | ||
} |
Oops, something went wrong.