Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "master to prod" #270

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
41 changes: 18 additions & 23 deletions components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import NotifSignUpButton from './ResultsPage/Results/NotifSignUpButton';
import { getRoundedTerm } from './terms';

const isWindow = typeof window !== 'undefined';
export const termAndCampusToURL = (
const termAndCampusToURL = (
t: string,
newCampus: string,
query: string
Expand All @@ -58,20 +58,21 @@ type HeaderProps = {
};

type DropdownMenuWrapperProps = {
splashPage?: boolean;
userInfo: UserInfo | null;
onSignOut: () => void;
onSignIn: (token: string) => void;
};

export const DropdownMenuWrapper = ({
splashPage = false,
userInfo,
onSignOut,
onSignIn,
}: DropdownMenuWrapperProps): ReactElement => {
const [showModal, setShowModal] = useState(false);
const [showMenuDropdown, setShowMenuDropdown] = useState(false);
const dropdownRef = useRef(null);
const router = useRouter();

useEffect(() => {
const handleCloseDropdown = (event: Event): void => {
Expand All @@ -95,29 +96,23 @@ export const DropdownMenuWrapper = ({
setShowMenuDropdown(!showMenuDropdown);
};

// Commented out until subscription page is finalized
// const subscriptionPage = (): void => {
// router.push('/subscriptions');
// };

const DropDownMenu = (): ReactElement => {
return (
<div className="user-menu">
<div className={'user-menu__icon-wrapper'}>
<>
{userInfo && !macros.isMobile && (
<button
onClick={() => router.push('/subscriptions')}
className="user-menu__button"
>
Notifications
</button>
)}
{/* Still need to create FAQ page */}
{/* <button>FAQ</button> */}
</>
<div
className="user-menu__icon"
ref={dropdownRef}
onClick={toggleMenuDropdown}
>
<IconUser />
</div>
<div
ref={dropdownRef}
className={
splashPage ? 'user-menu__splash-page' : 'user-menu__icon-wrapper'
}
onClick={toggleMenuDropdown}
>
{splashPage && <>Logged In</>}
<IconUser className="user-menu__icon" />
</div>

{showMenuDropdown && (
Expand Down Expand Up @@ -262,7 +257,7 @@ export default function Header({
/>
</div>
)}
{macros.isMobile && searchData && (
{searchData && (
<div className="Breadcrumb_Container">
<div className="Breadcrumb_Container__dropDownContainer">
<SearchDropdown
Expand Down
74 changes: 0 additions & 74 deletions components/ResultsPage/CampusSelection.tsx

This file was deleted.

80 changes: 0 additions & 80 deletions components/ResultsPage/SemesterDropdown.tsx

This file was deleted.

19 changes: 3 additions & 16 deletions components/common/AlertBanner.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
import React, { ReactElement, useState } from 'react';
import React, { useState } from 'react';
import macros from '../macros';
import IconClose from '../icons/IconClose';
import Colors from '../../styles/_exports.module.scss';
import GraduateLogo from '../icons/GraduateLogo';
import Colors from '../styles/_exports.module.scss';

type AlertLevel = 'error' | 'warning' | 'info';

export type AlertBannerData = {
text: string;
alertLevel: AlertLevel;
link?: string;
linkText?: string;
logo?: () => ReactElement;
};

type AlertBannerProps = {
Expand All @@ -31,20 +28,10 @@ export default function AlertBanner({ alertBannerData }: AlertBannerProps) {
>
<div className={`alertBanner ${alertBannerData.alertLevel}Banner`}>
<div className="alertBanner__text">
{alertBannerData.logo && (
<span className="alertBanner__logo">
<alertBannerData.logo />
</span>
)}
<span>
{alertBannerData.text}
{alertBannerData.link && (
<a href={alertBannerData.link} target="_blank" rel="noreferrer">
{' '}
{alertBannerData.linkText
? alertBannerData.linkText
: 'Learn More'}
</a>
<a href={alertBannerData.link}> Learn More.</a>
)}
</span>
</div>
Expand Down
82 changes: 0 additions & 82 deletions components/icons/GraduateLogo.tsx

This file was deleted.

Loading
Loading