Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions csm_web/frontend/src/components/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,11 @@ const CourseCard = ({ profiles }: CourseCardProps): React.ReactElement => {

if (role === Role.COORDINATOR) {
return (
<Link to={`/courses/${courseId}`} className="course-card-link">
<Card />
</Link>
<>
<Link to={`/courses/${courseId}`} className="course-card-link">
<Card />
</Link>
</>
);
}

Expand Down
2 changes: 1 addition & 1 deletion csm_web/frontend/src/components/SearchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const SearchBar = ({ className, refObject, onChange }: SearchBarProps) =>
return (
<div className={`search-bar ${className ?? ""}`}>
<SearchIcon className="search-icon" />
<input className="search-input" type="text" ref={refObject} onChange={onChange} />
<input placeholder="Search..." className="search-input" type="text" ref={refObject} onChange={onChange} />
</div>
);
};
39 changes: 39 additions & 0 deletions csm_web/frontend/src/components/coord_interface/ActionButton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import React from "react";
import { useLocation, useNavigate } from "react-router-dom";

interface ActionButtonProps {
copyEmail: () => void;
reset: () => void;
}

export default function ActionButton({ copyEmail, reset }: ActionButtonProps) {
const navigate = useNavigate();
const { pathname } = useLocation();
const isStudents = pathname.includes("students");
function changeURL() {
const newPath = isStudents ? pathname.replace("students", "mentors") : pathname.replace("mentors", "students");
reset();
navigate(newPath);
}
return (
<div className="actionButtons">
<button onClick={copyEmail}>
<div id="default-copy">Copy Selected Emails</div>
<div id="success-copy" className="hidden">
<div className="checkmark"></div>

<div>Copied!</div>
</div>
</button>
{isStudents ? (
<button onClick={changeURL}>
<div>See Mentors</div>
</button>
) : (
<button onClick={changeURL}>
<div>Students</div>
</button>
)}
</div>
);
}
29 changes: 29 additions & 0 deletions csm_web/frontend/src/components/coord_interface/CheckBox.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import React from "react";
import styles from "../../css/coord_interface.scss";

interface CheckBoxProps {
id: string;
onClick?: (e: React.MouseEvent<HTMLInputElement>) => void;
}

export function CheckBox({ id, onClick: onClick }: CheckBoxProps) {
return (
<td className={styles}>
<div className="checkbox-wrapper">
<input className="inp-cbx" id={id + "check"} type="checkbox" onClick={onClick} />
<label className="cbx" htmlFor={id + "check"}>
<span>
<svg width="12px" height="10px">
<use xlinkHref="#check"></use>
</svg>
</span>
</label>
<svg className="inline-svg">
<symbol id="check" viewBox="0 0 12 10">
<polyline points="1.5 6 4.5 9 10.5 1"></polyline>
</symbol>
</svg>
</div>
</td>
);
}
Loading