Skip to content

Commit

Permalink
update cli snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
jtoar committed Jul 21, 2022
1 parent d56a769 commit ec5ecd6
Show file tree
Hide file tree
Showing 5 changed files with 151 additions and 15 deletions.
Expand Up @@ -37,6 +37,7 @@ exports[`creates a multi word component 1`] = `
return (
<div>
<h2>{'UserProfile'}</h2>
<p>{'Find me in ./web/src/components/UserProfile/UserProfile.js'}</p>
</div>
)
Expand Down Expand Up @@ -80,6 +81,7 @@ exports[`creates a single word component 1`] = `
return (
<div>
<h2>{'User'}</h2>
<p>{'Find me in ./web/src/components/User/User.js'}</p>
</div>
)
Expand Down
Expand Up @@ -14,10 +14,15 @@ const A11yLayout = ({ children }) => {
return (
<>
{/* renders a link that remains hidden till focused; put it at the top of your layout */}
<SkipNavLink />
<nav></nav>
{/* renders a div as the target for the link; put it next to your main content */}
<SkipNavContent />
<main>{children}</main>
</>
)
Expand Down
Expand Up @@ -10,12 +10,16 @@ const HomePage = () => {
<MetaTags title=\\"Home\\" description=\\"Home page\\" />
<h1>HomePage</h1>
<p>
Find me in <code>./web/src/pages/HomePage/HomePage.js</code>
Find me in
<code>./web/src/pages/HomePage/HomePage.js</code>
</p>
<p>
My default route is named <code>home</code>, link to me with \`
<Link to={routes.home()}>Home</Link>\`
My default route is named
<code>home</code>, link to me with \`<Link to={routes.home()}>Home</Link>
\`
</p>
</>
)
Expand All @@ -35,11 +39,15 @@ const ContactUsPage = () => {
<MetaTags title=\\"ContactUs\\" description=\\"ContactUs page\\" />
<h1>ContactUsPage</h1>
<p>
Find me in <code>./web/src/pages/ContactUsPage/ContactUsPage.js</code>
Find me in
<code>./web/src/pages/ContactUsPage/ContactUsPage.js</code>
</p>
<p>
My default route is named <code>contactUs</code>, link to me with \`
My default route is named
<code>contactUs</code>, link to me with \`
<Link to={routes.contactUs()}>ContactUs</Link>\`
</p>
</>
Expand All @@ -60,12 +68,16 @@ const CatsPage = () => {
<MetaTags title=\\"Cats\\" description=\\"Cats page\\" />
<h1>CatsPage</h1>
<p>
Find me in <code>./web/src/pages/CatsPage/CatsPage.js</code>
Find me in
<code>./web/src/pages/CatsPage/CatsPage.js</code>
</p>
<p>
My default route is named <code>cats</code>, link to me with \`
<Link to={routes.cats()}>Cats</Link>\`
My default route is named
<code>cats</code>, link to me with \`<Link to={routes.cats()}>Cats</Link>
\`
</p>
</>
)
Expand All @@ -85,13 +97,18 @@ const PostPage = ({ id }) => {
<MetaTags title=\\"Post\\" description=\\"Post page\\" />
<h1>PostPage</h1>
<p>
Find me in <code>./web/src/pages/PostPage/PostPage.js</code>
Find me in
<code>./web/src/pages/PostPage/PostPage.js</code>
</p>
<p>
My default route is named <code>post</code>, link to me with \`
My default route is named
<code>post</code>, link to me with \`
<Link to={routes.post({ id: '42' })}>Post 42</Link>\`
</p>
<p>The parameter passed to me is {id}</p>
</>
)
Expand Down Expand Up @@ -223,12 +240,16 @@ const HomePage = () => {
<MetaTags title=\\"Home\\" description=\\"Home page\\" />
<h1>HomePage</h1>
<p>
Find me in <code>./web/src/pages/HomePage/HomePage.js</code>
Find me in
<code>./web/src/pages/HomePage/HomePage.js</code>
</p>
<p>
My default route is named <code>home</code>, link to me with \`
<Link to={routes.home()}>Home</Link>\`
My default route is named
<code>home</code>, link to me with \`<Link to={routes.home()}>Home</Link>
\`
</p>
</>
)
Expand Down Expand Up @@ -305,13 +326,18 @@ const PostPage = ({ id }) => {
<MetaTags title=\\"Post\\" description=\\"Post page\\" />
<h1>PostPage</h1>
<p>
Find me in <code>./web/src/pages/PostPage/PostPage.js</code>
Find me in
<code>./web/src/pages/PostPage/PostPage.js</code>
</p>
<p>
My default route is named <code>post</code>, link to me with \`
My default route is named
<code>post</code>, link to me with \`
<Link to={routes.post({ id: '42' })}>Post 42</Link>\`
</p>
<p>The parameter passed to me is {id}</p>
</>
)
Expand Down
Expand Up @@ -292,16 +292,19 @@ const PostsLayout = ({ children }) => {
return (
<div className=\\"rw-scaffold\\">
<Toaster toastOptions={{ className: 'rw-toast', duration: 6000 }} />
<header className=\\"rw-header\\">
<h1 className=\\"rw-heading rw-heading-primary\\">
<Link to={routes.posts()} className=\\"rw-link\\">
Posts
</Link>
</h1>
<Link to={routes.newPost()} className=\\"rw-button rw-button-green\\">
<div className=\\"rw-button-icon\\">+</div> New Post
</Link>
</header>
<main className=\\"rw-main\\">{children}</main>
</div>
)
Expand Down Expand Up @@ -346,6 +349,7 @@ const NewPost = () => {
<header className=\\"rw-segment-header\\">
<h2 className=\\"rw-heading rw-heading-secondary\\">New Post</h2>
</header>
<div className=\\"rw-segment-main\\">
<PostForm onSave={onSave} loading={loading} error={error} />
</div>
Expand Down Expand Up @@ -396,6 +400,7 @@ const NewUserProfile = () => {
<header className=\\"rw-segment-header\\">
<h2 className=\\"rw-heading rw-heading-secondary\\">New UserProfile</h2>
</header>
<div className=\\"rw-segment-main\\">
<UserProfileForm onSave={onSave} loading={loading} error={error} />
</div>
Expand Down Expand Up @@ -528,70 +533,86 @@ const Post = ({ post }) => {
Post {post.id} Detail
</h2>
</header>
<table className=\\"rw-table\\">
<tbody>
<tr>
<th>Id</th>
<td>{post.id}</td>
</tr>
<tr>
<th>Title</th>
<td>{post.title}</td>
</tr>
<tr>
<th>Slug</th>
<td>{post.slug}</td>
</tr>
<tr>
<th>Author</th>
<td>{post.author}</td>
</tr>
<tr>
<th>Body</th>
<td>{post.body}</td>
</tr>
<tr>
<th>Image</th>
<td>{post.image}</td>
</tr>
<tr>
<th>Posted at</th>
<td>{timeTag(post.postedAt)}</td>
</tr>
<tr>
<th>Is pinned</th>
<td>{checkboxInputTag(post.isPinned)}</td>
</tr>
<tr>
<th>Read time</th>
<td>{post.readTime}</td>
</tr>
<tr>
<th>Rating</th>
<td>{post.rating}</td>
</tr>
<tr>
<th>Upvotes</th>
<td>{post.upvotes}</td>
</tr>
<tr>
<th>Metadata</th>
<td>{jsonDisplay(post.metadata)}</td>
</tr>
<tr>
<th>Huge number</th>
<td>{post.hugeNumber}</td>
</tr>
</tbody>
</table>
</div>
<nav className=\\"rw-button-group\\">
<Link
to={routes.editPost({ id: post.id })}
className=\\"rw-button rw-button-blue\\"
>
Edit
</Link>
<button
type=\\"button\\"
className=\\"rw-button rw-button-red\\"
Expand Down Expand Up @@ -1073,6 +1094,7 @@ export const Success = ({ userProfile }) => {
Edit UserProfile {userProfile.id}
</h2>
</header>
<div className=\\"rw-segment-main\\">
<UserProfileForm
userProfile={userProfile}
Expand Down Expand Up @@ -1118,6 +1140,7 @@ export const Empty = () => {
return (
<div className=\\"rw-text-center\\">
{'No posts yet. '}
<Link to={routes.newPost()} className=\\"rw-link\\">
{'Create one?'}
</Link>
Expand Down Expand Up @@ -1218,37 +1241,64 @@ const PostsList = ({ posts }) => {
<thead>
<tr>
<th>Id</th>
<th>Title</th>
<th>Slug</th>
<th>Author</th>
<th>Body</th>
<th>Image</th>
<th>Posted at</th>
<th>Is pinned</th>
<th>Read time</th>
<th>Rating</th>
<th>Upvotes</th>
<th>Metadata</th>
<th>Huge number</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
{posts.map((post) => (
<tr key={post.id}>
<td>{truncate(post.id)}</td>
<td>{truncate(post.title)}</td>
<td>{truncate(post.slug)}</td>
<td>{truncate(post.author)}</td>
<td>{truncate(post.body)}</td>
<td>{truncate(post.image)}</td>
<td>{timeTag(post.postedAt)}</td>
<td>{checkboxInputTag(post.isPinned)}</td>
<td>{truncate(post.readTime)}</td>
<td>{truncate(post.rating)}</td>
<td>{truncate(post.upvotes)}</td>
<td>{jsonTruncate(post.metadata)}</td>
<td>{truncate(post.hugeNumber)}</td>
<td>
<nav className=\\"rw-table-actions\\">
<Link
Expand All @@ -1258,13 +1308,15 @@ const PostsList = ({ posts }) => {
>
Show
</Link>
<Link
to={routes.editPost({ id: post.id })}
title={'Edit post ' + post.id}
className=\\"rw-button rw-button-small rw-button-blue\\"
>
Edit
</Link>
<button
type=\\"button\\"
title={'Delete post ' + post.id}
Expand Down

0 comments on commit ec5ecd6

Please sign in to comment.