RW 0.28 <Set>
This commit is contained in:
@@ -3,6 +3,6 @@
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@redwoodjs/api": "^0.27.0"
|
||||
"@redwoodjs/api": "^0.28.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@redwoodjs/core": "^0.27.0"
|
||||
"@redwoodjs/core": "^0.28.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@redwoodjs/eslint-config"
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"@redwoodjs/auth": "^0.27.0",
|
||||
"@redwoodjs/forms": "^0.27.0",
|
||||
"@redwoodjs/router": "^0.27.0",
|
||||
"@redwoodjs/web": "^0.27.0",
|
||||
"@redwoodjs/auth": "^0.28.0",
|
||||
"@redwoodjs/forms": "^0.28.0",
|
||||
"@redwoodjs/router": "^0.28.0",
|
||||
"@redwoodjs/web": "^0.28.0",
|
||||
"netlify-identity-widget": "^1.9.1",
|
||||
"prop-types": "^15.7.2",
|
||||
"react": "^17.0.1",
|
||||
|
||||
@@ -7,15 +7,18 @@
|
||||
// 'src/pages/HomePage/HomePage.js' -> HomePage
|
||||
// 'src/pages/Admin/BooksPage/BooksPage.js' -> AdminBooksPage
|
||||
|
||||
import { Router, Route, Private } from '@redwoodjs/router'
|
||||
import { Router, Route, Private, Set } from '@redwoodjs/router'
|
||||
import BlogLayout from 'src/layouts/BlogLayout'
|
||||
|
||||
const Routes = () => {
|
||||
return (
|
||||
<Router>
|
||||
<Set wrap={BlogLayout}>
|
||||
<Route path="/contact" page={ContactPage} name="contact" />
|
||||
<Route path="/blog-post/{id:Int}" page={BlogPostPage} name="blogPost" />
|
||||
<Route path="/about" page={AboutPage} name="about" />
|
||||
<Route path="/" page={HomePage} name="home" />
|
||||
</Set>
|
||||
<Private unauthenticated="home">
|
||||
<Route path="/admin/posts/new" page={NewPostPage} name="newPost" />
|
||||
<Route path="/admin/posts/{id:Int}/edit" page={EditPostPage} name="editPost" />
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
import { Link, routes } from '@redwoodjs/router'
|
||||
import BlogLayout from 'src/layouts/BlogLayout'
|
||||
|
||||
const AboutPage = () => {
|
||||
return (
|
||||
<BlogLayout>
|
||||
<p className="font-light">
|
||||
This site was created to demonstrate my mastery of Redwood: Look on my
|
||||
works, ye mighty, and despair!
|
||||
</p>
|
||||
</BlogLayout>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
import BlogLayout from 'src/layouts/BlogLayout'
|
||||
import BlogPostCell from 'src/components/BlogPostCell'
|
||||
|
||||
const BlogPostPage = ({ id }) => {
|
||||
return (
|
||||
<BlogLayout>
|
||||
<BlogPostCell id={id} />
|
||||
</BlogLayout>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ import {
|
||||
} from '@redwoodjs/forms'
|
||||
import { Flash, useFlash, useMutation } from '@redwoodjs/web'
|
||||
import { useForm } from 'react-hook-form'
|
||||
import BlogLayout from 'src/layouts/BlogLayout'
|
||||
|
||||
const CREATE_CONTACT = gql`
|
||||
mutation CreateContactMutation($input: CreateContactInput!) {
|
||||
@@ -38,7 +37,7 @@ const ContactPage = () => {
|
||||
}
|
||||
|
||||
return (
|
||||
<BlogLayout>
|
||||
<>
|
||||
<Flash timeout={1000} className="bg-green-100 text-green-700" />
|
||||
<Form
|
||||
onSubmit={onSubmit}
|
||||
@@ -106,7 +105,7 @@ const ContactPage = () => {
|
||||
Save
|
||||
</Submit>
|
||||
</Form>
|
||||
</BlogLayout>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
import BlogLayout from 'src/layouts/BlogLayout'
|
||||
import BlogPostsCell from 'src/components/BlogPostsCell'
|
||||
|
||||
const HomePage = () => {
|
||||
return (
|
||||
<BlogLayout>
|
||||
<BlogPostsCell />
|
||||
</BlogLayout>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user