chore: optional types added and cleaned files
This commit is contained in:
@ -6,8 +6,8 @@ import { borderColorPicker } from '.';
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
interface AvatarRendererProps {
|
interface AvatarRendererProps {
|
||||||
isDonating: boolean;
|
isDonating?: boolean;
|
||||||
isTopContributor: boolean;
|
isTopContributor?: boolean;
|
||||||
picture: unknown;
|
picture: unknown;
|
||||||
userName: string;
|
userName: string;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
export default function borderColorPicker(
|
export default function borderColorPicker(
|
||||||
isDonating: boolean,
|
isDonating: boolean | undefined,
|
||||||
isTopContributor: boolean
|
isTopContributor: boolean | undefined
|
||||||
): string {
|
): string {
|
||||||
if (isDonating && isTopContributor) return 'purple-border';
|
if (isDonating && isTopContributor) return 'purple-border';
|
||||||
else if (isTopContributor) return 'blue-border';
|
else if (isTopContributor) return 'blue-border';
|
||||||
|
@ -1,13 +1,6 @@
|
|||||||
import React, { ReactNode } from 'react';
|
import React, { ReactNode } from 'react';
|
||||||
import { Link as GatsbyLink } from 'gatsby';
|
import { Link as GatsbyLink } from 'gatsby';
|
||||||
|
|
||||||
// const propTypes = {
|
|
||||||
// children: PropTypes.any,
|
|
||||||
// external: PropTypes.bool,
|
|
||||||
// sameTab: PropTypes.bool,
|
|
||||||
// to: PropTypes.string.isRequired
|
|
||||||
// };
|
|
||||||
|
|
||||||
interface LinkProps {
|
interface LinkProps {
|
||||||
children?: ReactNode;
|
children?: ReactNode;
|
||||||
external?: boolean;
|
external?: boolean;
|
||||||
|
Reference in New Issue
Block a user