-
Notifications
You must be signed in to change notification settings - Fork 1
Admin Dashboard Boilerplate #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: vontell/issue-16-supabase-integration
Are you sure you want to change the base?
Admin Dashboard Boilerplate #18
Conversation
| @@ -0,0 +1,63 @@ | |||
|
|
|||
| import React from 'react'; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since React 17 - we don't have to import React, we should be good to remove it
| </li> | ||
| ))} | ||
| <li> | ||
| <a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For in-app navigation - we should use the <Link> component.
| export default [index("routes/home.tsx")] satisfies RouteConfig; | ||
| export default [ | ||
| index("routes/home.tsx"), | ||
| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refer to writing Framework Routes
| // TODO: Define ResourceChangeLog type/schema based on your DB | ||
| // TODO: Implement fetchResourceChangelog() using Supabase | ||
|
|
||
| const ResourceChangelog: React.FC = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the React.FC type is no longer a preferred approach.
- It's a bit verbose, and Typescript already infers it just by being a function that returns JSX.
- We should only type the component props
| @@ -0,0 +1,56 @@ | |||
|
|
|||
|
|
|||
| import React, { useEffect, useState } from 'react'; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove React import
| } catch (err: any) { | ||
| setError(err.message || 'Failed to fetch resources'); | ||
| } | ||
| setLoading(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move this to a finally clause
Addresses #14
This PR builds on the utility functions (still in review as #17) outlined on issue #16, and adds some boilerplate tabs and views for the dashboard.
Please refer to other issues and the loose roadmap in the README from this PR for more information on what remains to be built.