Skip to content
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

Host profile layout #33

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Host profile layout #33

wants to merge 4 commits into from

Conversation

IMightBeAce
Copy link
Contributor

Added a host profile layout, as if a user was viewing someone else's profile.

Copy link
Collaborator

@mclausen792 mclausen792 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple comments, but overall good job!

.list-events{
padding: 5rem;
font-size: 3rem;
/* background-color: #ffeadf; */
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be removed

} catch (err) {
setError('Error fetching events. Please try again.');
setIsLoading(false);
console.error(err);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be removed

{pinnedEvent ? (
<div>
<div className="pin-header">
<h3>{pinnedEvent.event_title} in X days! Don't miss it!</h3>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this supposed to show an actual number?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes but I couldn't figure out how to subtract the date of the event from the current date.

Copy link
Collaborator

@mclausen792 mclausen792 Jan 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to see if this works? And if not we can look at it a little bit next week!

function days_between(date1, date2) {

    // The number of milliseconds in one day
    const ONE_DAY = 1000 * 60 * 60 * 24;

    // Calculate the difference in milliseconds
    const differenceMs = Math.abs(date1 - date2);

    // Convert back to days and return
    return Math.round(differenceMs / ONE_DAY);

}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it would be helpful if we could go over this next week. I was having some issues with the backend so I couldn't see the changes I was making on the layout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants