lot of refactoring, reorganized course buttons. Now linking to professors directory page

This commit is contained in:
Sriram Hariharan
2023-03-07 21:49:41 -06:00
parent 04a82fb6a6
commit 353c43c987
26 changed files with 556 additions and 311 deletions

View File

@@ -21,6 +21,7 @@ export default function Link(props: PropsWithChildren<Props>) {
if (url && !props.onClick) {
passedProps.onClick = () => bMessenger.openNewTab({ url });
}
const isDisabled = props.disabled || (!url && !props.onClick);
return (
<Text
@@ -28,7 +29,7 @@ export default function Link(props: PropsWithChildren<Props>) {
className={classNames(
styles.link,
{
[styles.disabled]: props.disabled,
[styles.disabled]: isDisabled,
},
props.className
)}