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
Admin dashboard #20
Admin dashboard #20
Conversation
annesatran
commented
Jul 21, 2022
- Added admin dashboard with searchbar and sort dropdown
- Need to add "Add" button on admin dashboard
- Added routing to view an individual dog record with DogRecordPage component
- DogRecordPage component makes API call to get a dog record, but nothing displays on frontend
- Still need work on styling/choosing exactly what information is displayed
<img className="dog-record-image" src={props.imageUrl} alt={`Image of ${props.name}`} /> | ||
<Card.Title>{props.name}</Card.Title> | ||
<Card.Subtitle className="mb-2 text-muted">{props.breed} | {props.sex == "m" ? "Male" : "Female"} | {props.ageGroup}</Card.Subtitle> | ||
<Card.Text>Entered {moment(new Date(props.dateEntered)).format("MM/DD/YYYY")}</Card.Text> |
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.
Nice work! How is it working with moment?
I was also working with dates and found the command toLocaleDateString().
Maybe that could work in this case?
My only hesitation is that people say that moment is a relatively big package for what it is used for.
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.
But if you tried vanilla JS and it was giving issues, let's go with moment :)
…eString() instead