bunch of misc changes
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
import React from 'react';
|
||||
import { bMessenger } from 'src/shared/messages';
|
||||
import { background } from 'src/shared/messages';
|
||||
import useSchedules from '../hooks/useSchedules';
|
||||
import { Button } from './common/Button/Button';
|
||||
import ExtensionRoot from './common/ExtensionRoot/ExtensionRoot';
|
||||
|
||||
const { clearCourses } = bMessenger;
|
||||
export default function PopupMain() {
|
||||
const [activeSchedule, schedules] = useSchedules();
|
||||
|
||||
@@ -15,7 +14,7 @@ export default function PopupMain() {
|
||||
<Button
|
||||
onClick={() => {
|
||||
if (!activeSchedule) return;
|
||||
clearCourses({ scheduleName: activeSchedule?.name });
|
||||
background.clearCourses({ scheduleName: activeSchedule?.name });
|
||||
}}
|
||||
>
|
||||
Clear Courses
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import classNames from 'classnames';
|
||||
import React, { PropsWithChildren } from 'react';
|
||||
import { bMessenger } from 'src/shared/messages';
|
||||
import { background } from 'src/shared/messages';
|
||||
import Text, { TextProps } from '../Text/Text';
|
||||
import styles from './Link.module.scss';
|
||||
|
||||
@@ -20,7 +20,7 @@ export default function Link(props: PropsWithChildren<Props>) {
|
||||
const { url } = props;
|
||||
|
||||
if (url && !props.onClick) {
|
||||
passedProps.onClick = () => bMessenger.openNewTab({ url });
|
||||
passedProps.onClick = () => background.openNewTab({ url });
|
||||
}
|
||||
const isDisabled = props.disabled || (!url && !props.onClick);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { bMessenger } from 'src/shared/messages';
|
||||
import { background } from 'src/shared/messages';
|
||||
import { Course } from 'src/shared/types/Course';
|
||||
import { UserSchedule } from 'src/shared/types/UserSchedule';
|
||||
import { Button } from 'src/views/components/common/Button/Button';
|
||||
@@ -13,7 +13,7 @@ type Props = {
|
||||
course: Course;
|
||||
};
|
||||
|
||||
const { openNewTab, addCourse, removeCourse } = bMessenger;
|
||||
const { openNewTab, addCourse, removeCourse } = background;
|
||||
|
||||
/**
|
||||
* This component displays the buttons for the course info popup, that allow the user to either
|
||||
|
||||
Reference in New Issue
Block a user