-
-
Notifications
You must be signed in to change notification settings - Fork 134
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
Create modal form for user story. #240
Conversation
👷 Deploy request for pawternityhub pending review. 🔨 Explore the source changes: beb6673 |
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.
Don't forget to link the issues and a screenshot (if possible) of the work. If you are having errors related to formatting, run yarn format
.
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.
alright good work so far. sorry about the db issues. just need to fix some issues and use the components from react-bootstrap
and react-supabase
to make things easier.
src/components/stories/Stories.css
Outdated
label { | ||
font-weight: bold; | ||
margin: 0.5em 0em 0.3em 0em; | ||
} | ||
input, | ||
textarea, | ||
.country, | ||
.region { | ||
border: solid 0.5px #000; | ||
border-radius: 4px; | ||
padding: 0.3em; | ||
} | ||
input, | ||
textarea { | ||
display: block; | ||
width: 100%; | ||
} | ||
textarea { |
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.
double check if it affected the other forms or inputs in the site
src/components/stories/Stories.jsx
Outdated
</Modal.Header> | ||
<Modal.Body> | ||
<div className="formContainer"> | ||
<form onSubmit={handleSubmit(onSubmit)}> |
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.
use the Form
component from react-bootstrap
Hi @redxzeta, I have modified the code based on your suggestions, please take a look and let me know if you want any change. Thanks a lot. |
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.
Awesome changes :)
Just one minor small fix
src/components/stories/Stories.jsx
Outdated
<Button className="story_btn" onClick={handleShow}> | ||
Create your Story | ||
</Button> |
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.
Show this button to only logged in users.
Show a button with a link to the login page so users can login
package.json
Outdated
"react-dom": "^17.0.0", | ||
"react-hook-form": "^7.20.5", |
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.
hmm are you still using this?
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.
Oh right, I forgot to uninstall it.
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.
Just one more minor fix
src/components/stories/Stories.jsx
Outdated
)} | ||
{!user && ( | ||
<Button className="story_btn" as={Link} to={"/login"}> | ||
Create your Story |
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.
Login
if you want you could user ternary operator
Insert new story to database.
Here are some tasks I have done to fix #232 :
react-country-region-selector
)react-supabase
FetchingButton.jsx
in layoutPlease take a look and give me some suggestion.