Skip to content

Commit

Permalink
deleting console logs
Browse files Browse the repository at this point in the history
  • Loading branch information
denniwang committed Dec 29, 2024
1 parent 581a66e commit a722aa2
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 24 deletions.
3 changes: 0 additions & 3 deletions packages/frontend/components/Plan/AddPlanModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ import { HelperToolTip } from "../Help";
import { IsGuestContext } from "../../pages/_app";
import { GraduateToolTip } from "../GraduateTooltip";
import { getLocalPlansLength } from "../../utils/plan/getLocalPlansLength";
//import { extractSupportedMinorOptions } from "../../utils/plan/supportedMinors";

interface AddPlanModalProps {
setSelectedPlanId: Dispatch<SetStateAction<number | undefined | null>>;
Expand All @@ -66,8 +65,6 @@ export const AddPlanModal: React.FC<AddPlanModalProps> = ({
useSupportedMajors();
const { supportedMinorsData, error: supportedMinorsError } =
useSupportedMinors();
//const { supportedMinorsData, error: supportedMinorsError } =
//useSupportedMinors();
const {
register,
handleSubmit,
Expand Down
2 changes: 0 additions & 2 deletions packages/frontend/components/Plan/EditPlanModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,6 @@ export const EditPlanModal: React.FC<EditPlanModalProps> = ({ plan }) => {
catalogYear,
supportedMinorsData
)}
//TODO:::: HOW TO HAVE DFAULT VALUEEEEEEEEEEE :DDDDD
//rules={{ required: "Minor is required." }}
isDisabled={!catalogYear}
isSearchable
useFuzzySearch
Expand Down
12 changes: 1 addition & 11 deletions packages/frontend/components/Sidebar/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ const Sidebar: React.FC<SidebarProps> = memo(
selectedPlan.catalogYear,
selectedPlan.minor
);
//console.log("minor response");
//console.log(minorResponse.minor);

const workerRef = useRef<Worker>();

Expand Down Expand Up @@ -165,14 +163,7 @@ const Sidebar: React.FC<SidebarProps> = memo(
useEffect(() => revalidateMajor(), [selectedPlan, major]);

const majorCourses = getAllCoursesInMajor(major, concentration);

console.log({ minorResponse });
const minorCourses = getAllCoursesInMinor(minorResponse.minor);
console.log({ majorCourses });
console.log({ minorCourses });

// console.log({minorCourses});
// TODO: add get all courses in minor

const {
courses,
Expand All @@ -184,7 +175,6 @@ const Sidebar: React.FC<SidebarProps> = memo(
);

const courseData = createCourseMap(courses, courseErrors);
console.log({ courseData });

if (isMajorLoading) {
return <SidebarContainer title="Loading..." />;
Expand Down Expand Up @@ -295,7 +285,7 @@ const Sidebar: React.FC<SidebarProps> = memo(

{minorResponse.minor && (
<>
<Text>We have a minor </Text>
<Text>Requirements for {minorResponse.minor.name}</Text>
{minorResponse.minor?.requirementSections.map(
(section, index) => {
return (
Expand Down
2 changes: 0 additions & 2 deletions packages/frontend/pages/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,6 @@ const HomePage: NextPage = () => {
let renderedSidebar = <NoPlanSidebar />;
if (selectedPlan) {
if (selectedPlan.major) {
console.log("PRINTING SELECTED PLAN");
console.log(selectedPlan);
renderedSidebar = (
<Sidebar
selectedPlan={selectedPlan}
Expand Down
6 changes: 0 additions & 6 deletions packages/frontend/utils/plan/getAllCoursesInMajor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@ export const getAllCoursesInMinor = (
const minorRequirements = minor.requirementSections.reduce(
(courses: IRequiredCourse[], section: Section) => {
const requiredCourses: IRequiredCourse[] = [];
// console.log("section requirements for minor");
// console.log(section.requirements);
// if (section.requirements) {
// getRequiredCourses(section.requirements, requiredCourses);
// }

getRequiredCourses(section?.requirements ?? [], requiredCourses);
return courses.concat(requiredCourses);
},
Expand Down

0 comments on commit a722aa2

Please sign in to comment.