Skip to content
This repository has been archived by the owner on Apr 21, 2024. It is now read-only.

Commit

Permalink
chore: fix hooks related eslint issues (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeyRoyt committed Dec 26, 2023
1 parent e5a6216 commit 5daed08
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const GithubContributorsList: FC<GithubContributorsListProps> = ({
const [contributorsJson, setContributorsJson] = useState<GithubContributorResponse[]>([]);
useEffect(() => {
fetchAllContributors(organizationName, packageName).then(contributors => setContributorsJson(contributors));
}, []);
}, [organizationName, packageName]);

const contributors = useMemo(() => {
const developerContributors = contributorsJson
Expand All @@ -42,7 +42,7 @@ const GithubContributorsList: FC<GithubContributorsListProps> = ({
);
const contributorsData = staticContributors.concat(developerContributors);
return <ContributorsList contributorsData={contributorsData} showContributionAmount={showContributionAmount} />;
}, [contributorsJson]);
}, [contributorsJson, excludedContributorsIds, showContributionAmount, staticContributors]);

return (
<Paragraph>
Expand Down
3 changes: 2 additions & 1 deletion src/components/related-component/related-component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ const RelatedComponent: React.FC<RelatedComponentProps> & { linkTargets?: typeof
href,
linkTarget,
}) => {
const overrideLinkTarget = linkTarget || useContext(RelatedComponentsContext).linkTarget;
const contextLinkTarget = useContext(RelatedComponentsContext)?.linkTarget;
const overrideLinkTarget = linkTarget || contextLinkTarget;
return (
<InformationBox
component={<div className={styles.relatedComponentComponent}>{component}</div>}
Expand Down
2 changes: 1 addition & 1 deletion src/components/storybook-link/storybook-link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const StorybookLink: FC<StorybookLinkProps> & { sizes?: typeof LinkSize } = ({ p
const href = await hrefTo(page, story);
setUrl(href);
}
}, []);
}, [page, story]);

return (
<Link href={url} target={Link.targets.TOP} withoutSpacing size={size}>
Expand Down

0 comments on commit 5daed08

Please sign in to comment.