Skip to content

Commit

Permalink
Merge pull request #233 from agiledev-students-fall2023/final-update
Browse files Browse the repository at this point in the history
Fix styling after see problem in deployment
  • Loading branch information
joyc7 authored Dec 7, 2023
2 parents 14869bb + 049d584 commit f3f2af6
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 7 deletions.
22 changes: 15 additions & 7 deletions front-end/src/components/Events.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,34 @@ function Events({ isDarkMode }) {
const [searchTerm, setSearchTerm] = useState("");

function reformatDate(dateStr) {

const months = [
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec",
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec",
];

// Create a new Date object in local time zone
const date = new Date(dateStr);

// Convert it back to UTC
date.setMinutes(date.getMinutes() + date.getTimezoneOffset());

const monthName = months[date.getUTCMonth()];
const day = date.getUTCDate();
const year = date.getUTCFullYear();

return `${monthName} ${day} ${year}`;
}


// Toggle the 'body-dark-mode' class on the body element
useEffect(() => {
if (isDarkMode) {
Expand Down
1 change: 1 addition & 0 deletions front-end/src/components/FriendsPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ function FriendsPage({ isDarkMode }) {
currentUserFriends={currentUserFriends}
/>
)}
<div className="navbar-placeholder" style={{ height: "4rem" }}></div>

<Navbar />
</div>
Expand Down
1 change: 1 addition & 0 deletions front-end/src/components/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ const Home = ({ isDarkMode }) => {
</Link>
</div>
</div>
<div className="navbar-placeholder" style={{ height: "4rem" }}></div>
<Navbar />
</div>
);
Expand Down
1 change: 1 addition & 0 deletions front-end/src/components/UserInfo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ function UserInfo({ isDarkMode, toggleDarkMode }) {
</li>
</ul>
</div>
<div className="navbar-placeholder" style={{ height: "4rem" }}></div>
<Navbar isDarkMode={isDarkMode} />
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions front-end/src/styles/FriendsPage.css
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@

.dark-mode .add-friends-btn {
@apply bg-gray-500 border-gray-600 hover:bg-gray-600 active:bg-gray-700;
width: auto;
}

.dark-mode .add-friends-btn-div {
Expand Down

0 comments on commit f3f2af6

Please sign in to comment.