Skip to content

Commit

Permalink
resolve build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
kylemh committed Jun 20, 2024
1 parent b5e1a97 commit 578a7e2
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 25 deletions.
2 changes: 1 addition & 1 deletion components/Modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export interface ModalPropsType {
/**
* Function that is called when the user clicks the close button.
*/
onRequestClose: (previousValue?: boolean) => void;
onRequestClose?: () => void;
/**
* Applies a label for the screen reader.
*/
Expand Down
4 changes: 2 additions & 2 deletions components/Modal/__stories__/Modal.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Meta, StoryObj } from '@storybook/react';
import { useState } from 'react';
import { isChromatic } from 'chromatic/isChromatic';
import isChromatic from 'chromatic/isChromatic';
import { Modal } from '../Modal';
import { descriptions } from '@/common/constants/descriptions';
import { Button } from '@/components/Buttons/Button/Button';
Expand Down Expand Up @@ -35,7 +35,7 @@ export const Default: ModalStoryType = {
<Modal
{...args}
isOpen={isDemoModalOpen}
onRequestClose={prevValue => setIsDemoModalOpen(!prevValue)}
onRequestClose={() => setIsDemoModalOpen(prevValue => !prevValue)}
/>
</>
);
Expand Down
2 changes: 1 addition & 1 deletion components/OutboundLink/OutboundLink.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import classNames from 'node_modules/classnames/index';
import classNames from 'classnames';
import { gtag } from '@/common/utils/thirdParty/gtag';
import ExternalLinkIcon from '@/public/static/images/icons/FontAwesome/external-link-square-alt-solid.svg';
import { ScreenReaderOnly } from '@/components/ScreenReaderOnly/ScreenReaderOnly';
Expand Down
5 changes: 3 additions & 2 deletions components/Pagination/Pagination.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { PREV_PAGE_BUTTON, NEXT_PAGE_BUTTON } from '../../common/constants/testIDs';
import { ParsedUrlQueryInput } from 'node:querystring';
import { PaginationItem } from './PaginationItem/PaginationItem';
import { PREV_PAGE_BUTTON, NEXT_PAGE_BUTTON } from '@/common/constants/testIDs';
import LeftAngleIcon from '@/public/static/images/icons/FontAwesome/angle-left-solid.svg';
import RightAngleIcon from '@/public/static/images/icons/FontAwesome/angle-right-solid.svg';

Expand All @@ -15,7 +16,7 @@ export interface PaginationPropsType {
/**
* Sets the URL path.
*/
query: Record<string, unknown>;
query: ParsedUrlQueryInput;
/**
* Sets the total number of pages.
*/
Expand Down
3 changes: 2 additions & 1 deletion components/Pagination/PaginationItem/PaginationItem.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { ParsedUrlQueryInput } from 'node:querystring';
import Link from 'next/link';
import omit from 'lodash/omit';
import classNames from 'classnames';
Expand All @@ -21,7 +22,7 @@ export interface PaginationItemPropsType {
* Sets styles to indicate the current item is selected.
*/
isCurrent?: boolean;
query?: Record<string, unknown>;
query?: ParsedUrlQueryInput;
value?: number;
}

Expand Down
2 changes: 1 addition & 1 deletion components/Press/PressLinks/PressLinks.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as Tabs from '@radix-ui/react-tabs';
import { objectKeys } from 'utils/types';
import * as Articles from './Articles';
import styles from './PressLinks.module.css';
import { OutboundLink } from '@/components/OutboundLink/OutboundLink';
import { objectKeys } from '@/utils/types';

export function PressLinks() {
return (
Expand Down
6 changes: 3 additions & 3 deletions components/Press/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Photos from './PressPhotos/PressPhotos';
import Videos from './PressVideos/PressVideos';
import Links from './PressLinks/PressLinks';
import { PressPhotos as Photos } from './PressPhotos/PressPhotos';
import { PressVideos as Videos } from './PressVideos/PressVideos';
import { PressLinks as Links } from './PressLinks/PressLinks';

export { Photos, Videos, Links };
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { React } from 'react';
import { Meta, StoryObj } from '@storybook/react';
import { FC } from 'react';
import { DonateSection } from '../DonateSection';

type DonateSectionStoryType = StoryObj<React.FC>;
type DonateSectionStoryType = StoryObj<FC>;

const meta: Meta<typeof DonateSection> = {
title: 'ReusableSections/DonateSection',
Expand Down
2 changes: 1 addition & 1 deletion components/Timeline/Timeline.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { objectKeys } from 'utils/types';
import { historyData } from './historyData';
import styles from './Timeline.module.css';
import { TimelineEvent } from './TimelineEvent/TimelineEvent';
import { objectKeys } from '@/utils/types';

export function Timeline() {
return (
Expand Down
2 changes: 0 additions & 2 deletions components/UpgradeBrowserOverlay/UpgradeBrowserOverlay.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import noop from 'lodash/noop';
import Image from 'next/legacy/image';
import styles from './UpgradeBrowserOverlay.module.css';
import { Modal } from '@/components/Modal/Modal';
Expand Down Expand Up @@ -32,7 +31,6 @@ export function UpgradeBrowserOverlay() {

return (
<Modal
onRequestClose={noop}
className={styles.UpgradeBrowserOverlay}
screenReaderLabel="Upgrade Your Browser"
isOpen
Expand Down
2 changes: 1 addition & 1 deletion pages/join/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { gtag } from '@/common/utils/thirdParty/gtag';
import { Head } from '@/components/Head';
import { HeroBanner } from '@/components/HeroBanner/HeroBanner';
import { Content } from '@/components/Content/Content';
import RegistrationForm from '@/components/Forms/RegistrationForm/RegistrationForm';
import { RegistrationForm } from '@/components/Forms/RegistrationForm/RegistrationForm';
import { login } from '@/common/utils/auth-utils';

const pageTitle = 'Join';
Expand Down
12 changes: 8 additions & 4 deletions pages/team.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,14 @@ export default function Team() {
)}
</>
}
image={{
source: imageSource,
alt: `Headshot of ${name}`,
}}
image={
imageSource
? {
source: imageSource,
alt: `Headshot of ${name}`,
}
: undefined
}
>
{description}
</FlatCard>
Expand Down
6 changes: 2 additions & 4 deletions types/files.d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
declare module '*.svg' {
import { SVGProps, ReactSVGElement } from 'react';

export const ReactComponent: (props?: SVGProps<SVGElement>) => ReactSVGElement;

const filePath: string;
const ReactComponent: (props?: SVGProps<SVGElement>) => ReactSVGElement;

// eslint-disable-next-line import/no-default-export
export default filePath;
export default ReactComponent;
}

0 comments on commit 578a7e2

Please sign in to comment.