-
Notifications
You must be signed in to change notification settings - Fork 5
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
4 changed files
with
49 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
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,13 @@ | ||
import type { Meta, StoryObj } from '@storybook/react' | ||
|
||
import DashboardPage from './DashboardPage' | ||
|
||
const meta: Meta<typeof DashboardPage> = { | ||
component: DashboardPage, | ||
} | ||
|
||
export default meta | ||
|
||
type Story = StoryObj<typeof DashboardPage> | ||
|
||
export const Primary: Story = {} |
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,14 @@ | ||
import { render } from '@redwoodjs/testing/web' | ||
|
||
import DashboardPage from './DashboardPage' | ||
|
||
// Improve this test with help from the Redwood Testing Doc: | ||
// https://redwoodjs.com/docs/testing#testing-pages-layouts | ||
|
||
describe('DashboardPage', () => { | ||
it('renders successfully', () => { | ||
expect(() => { | ||
render(<DashboardPage />) | ||
}).not.toThrow() | ||
}) | ||
}) |
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,21 @@ | ||
import { Link, routes } from '@redwoodjs/router' | ||
import { MetaTags } from '@redwoodjs/web' | ||
|
||
const DashboardPage = () => { | ||
return ( | ||
<> | ||
<MetaTags title="Dashboard" description="Dashboard page" /> | ||
|
||
<h1>DashboardPage</h1> | ||
<p> | ||
Find me in <code>./web/src/pages/DashboardPage/DashboardPage.tsx</code> | ||
</p> | ||
<p> | ||
My default route is named <code>dashboard</code>, link to me with ` | ||
<Link to={routes.dashboard()}>Dashboard</Link>` | ||
</p> | ||
</> | ||
) | ||
} | ||
|
||
export default DashboardPage |