Skip to content

Commit

Permalink
fix: build error TS2322
Browse files Browse the repository at this point in the history
  • Loading branch information
kylejb committed Jan 24, 2022
1 parent 540f2dc commit f80647f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
23 changes: 13 additions & 10 deletions web/src/components/sightingcard/SightingCard.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
import Compass from 'components/compass';

interface SightingCardProps {
type SightingCardProps = {
key?: number;
header?: boolean;
isSelected?: boolean;
selectSightingCard?: (sightingCardIndex?: number) => void;
sightingData: any;
}
sightingData?: any;
} & typeof defaultProps;

const defaultProps = {
sightingData: {
date: 'DATE',
time: 'TIME',
duration: 'DURATION',
},
};
const baseStyle =
'grid grid-cols-8 grid-flow-row auto-rows-max gap-4 py-4 mx-4 text-gray-300 text-base hover:text-stone-50';
// TODO: Refactor SightingCard JSX with reusable components
Expand Down Expand Up @@ -78,12 +87,6 @@ const SightingCard = ({
</div>
);

SightingCard.defaultProps = {
sightingData: {
date: 'DATE',
time: 'TIME',
duration: 'DURATION',
},
};
SightingCard.defaultProps = defaultProps;

export default SightingCard;
2 changes: 1 addition & 1 deletion web/src/components/sightingcard/SightingCardList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const SightingCardList = ({ tableData }) => {
Sighting Opportunities
</h2>
<div className='text-gray-300 text-sm divide-zinc-700 divide-y last:divide-0'>
<SightingCard header />
<SightingCard header={true} />
{renderSightingCards()}
</div>
</div>
Expand Down

0 comments on commit f80647f

Please sign in to comment.