chore: Remove unused prop

This commit is contained in:
Fabio Berger
2018-10-16 16:38:05 +01:00
parent 05f7b73307
commit 17fb4d5b57
2 changed files with 1 additions and 6 deletions

View File

@@ -19,7 +19,6 @@ export interface MarkdownSectionProps {
markdownContent: string;
headerSize?: HeaderSizes;
githubLink?: string;
shouldReformatTitle?: boolean;
alternativeSectionTitle?: string;
}
@@ -36,7 +35,6 @@ export interface MarkdownSectionState {
export class MarkdownSection extends React.Component<MarkdownSectionProps, MarkdownSectionState> {
public static defaultProps: Partial<MarkdownSectionProps> = {
headerSize: HeaderSizes.H3,
shouldReformatTitle: true,
};
constructor(props: MarkdownSectionProps) {
super(props);
@@ -48,9 +46,7 @@ export class MarkdownSection extends React.Component<MarkdownSectionProps, Markd
const { sectionName, markdownContent, headerSize, githubLink } = this.props as PropsWithDefaults;
const id = utils.getIdFromName(sectionName);
const formattedSectionName = this.props.shouldReformatTitle
? utils.convertCamelCaseToSpaces(sectionName)
: sectionName;
const formattedSectionName = utils.convertCamelCaseToSpaces(sectionName);
const title = !_.isUndefined(this.props.alternativeSectionTitle)
? this.props.alternativeSectionTitle
: formattedSectionName;