Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Commit

Permalink
Color fix & API endpoint reset
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonmzx committed Nov 10, 2023
1 parent b2b2b2c commit 0cf2e5b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions frontend/client/src/components/calendar/NewCalendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ const NewCalendar = ({

const color = event["colour"];

console.log("COLOR "+color)
console.log("WTF: "+String(dateObject))
console.log("WTF: "+String(dateObject.getDay()))

Expand Down
8 changes: 5 additions & 3 deletions frontend/client/src/components/calendar/NewCalendarEvent.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,19 +88,21 @@ const NewCalendarEvent = ({eventBlob, colStart, timeStart, timeEnd, color, EARLI
return (
<div
onClick={() => {onClickCallback(eventBlob)}}
className={`${color ? color : "bg-blue-300"} rounded-lg shadow transition duration-300 cursor-pointer r_font`}
className={`rounded-lg shadow transition duration-300 cursor-pointer r_font`}
style={{
gridColumnStart: columnStart,
gridRowStart: verticalRowStart,
gridRowEnd : verticalRowStart+nRows,
width : viewState === 2 ? "60vw" : "12vw"
width : viewState === 2 ? "60vw" : "12vw",
backgroundColor: color ? color : '#b8daff' // Using HEX color if available, otherwise a default value
}}
onMouseEnter={() => setIsHovered(true)}
onMouseLeave={() => setIsHovered(false)}
>
{isHovered ? genHovered() : nameCrop(eventBlob["name"],deltaMins)}
</div>
);
);

}
};

Expand Down
4 changes: 2 additions & 2 deletions frontend/client/src/util/requests.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import Cookies from 'universal-cookie';
import { general_ics, notion_csv } from "./constant";

//ENDPOINT DEFINITIONS
// let ENDPOINT = "https://api.ezcampus.org/"
let ENDPOINT = "http://localhost:8000";
let ENDPOINT = "https://api.ezcampus.org/"
//let ENDPOINT = "http://localhost:8000";
let SEARCH_ENDPOINT = `https://search.ezcampus.org/searchIndex/`;

// Requests Console Logger
Expand Down

0 comments on commit 0cf2e5b

Please sign in to comment.