-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/create path #15
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
Conversation
| leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" | ||
| > | ||
| <Dialog.Panel className="relative transform overflow-hidden rounded-lg bg-gray-200 px-4 pt-5 pb-4 text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-lg sm:p-6"> | ||
| {typeof title === "string" && ( |
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.
create a typeguard for this something like:
const isString = (value: unkown): value is string => typeof value === 'string'
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.
Is this necessary if it's only being used once here, I can understand if there was repeated use.
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.
I think as this thing grows it would be useful to have some utility functions, especially if you might want to use this as a project to show someone but can keep it as is for now if you like.
| className={clsx( | ||
| "flex justify-center text-red-400", | ||
| venuesPath.includes(venue.name) && "text-blue-400" | ||
| venuesPath.includes(venue) && "text-blue-400" |
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.
you could add another guard here something like this:
const isNullish = (value: unknown): value is null | undefined => {
return value === null || value === undefined;
}
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.
Would be good to talk through this guarding idea it at some point.
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.
ok sounds good.
Sam-Archie
left a comment
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.
Have a look at getting that modal working just using state props, I should be around for a bit to help out with this if needs be.
It would also be good to get some test coverage. Again happy to start working on that.
This PR is doing a few things
-Plans can now be saved to DB.
The current pages are...
So far only the plans page has been implemented.
-Refactored the header so the login dropdown in the mobile nav works.
-Error handling has been added to the login and register forms.
Kapture.2023-02-24.at.16.48.20.mp4