Skip to content

Commit 2abdb92

Browse files
Merge pull request #218 from ajeetchaulagain/refactor/code-cleanup-and-consistency
Refactor: code cleanup and consistency improvements
2 parents 1a4e77b + 12c31dd commit 2abdb92

6 files changed

Lines changed: 8 additions & 7 deletions

File tree

src/components/get-in-touch-section/GetInTouchSection.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import React from 'react';
22
import { Paragraph } from '../paragraph/Paragraph';
33
import { socialMediaLinks } from '../social-media-icons/socialMediaLinks';
44
import { Container, SocialLinksList, SocialLinkItem } from './styles';
5-
import { Heading } from 'components/heading/Heading';
6-
import { ButtonLink } from 'components/button-link';
5+
import { Heading } from '../heading/Heading';
6+
import { ButtonLink } from '../button-link';
77

88
export const GetInTouchSection = () => {
99
return (

src/components/heading/Heading.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const Heading3 = styled.h3<{ size?: HeadingFontSize; type?: FontType }>`
7474
`};
7575
`;
7676

77-
const Heading4 = styled.h3<{ size?: HeadingFontSize; type?: FontType }>`
77+
const Heading4 = styled.h4<{ size?: HeadingFontSize; type?: FontType }>`
7878
font-size: ${({ size, theme: { headingFontSizes } }) =>
7979
size ? headingFontSizes[size] : headingFontSizes.medium};
8080
@@ -95,6 +95,7 @@ export const Heading = ({ level, children, ...rest }: HeadingProps) => {
9595
break;
9696
case 'h4':
9797
HeadingComponent = Heading4;
98+
break;
9899
default:
99100
HeadingComponent = Heading1;
100101
break;

src/components/hero-blank/HeroBlank.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import styled from 'styled-components';
44
import breakpoint from 'styled-components-breakpoint';
55
import { py } from 'styled-components-spacing';
66

7-
export const Container = styled.div`
7+
const Container = styled.div`
88
width: 100%;
99
`;
1010

src/components/icon/Icon.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ export const Icon = ({ iconName }: { iconName: IconName }) => {
3636
if (!iconName) {
3737
return null;
3838
}
39-
const IconComponent = iconName && IconMap[iconName];
39+
const IconComponent = IconMap[iconName];
4040
return <IconComponent />;
4141
};

src/components/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export * from './project-card';
1717
export * from './button-link';
1818
export * from './paragraph/Paragraph';
1919
export * from './social-media-icons/SocialMediaIcons';
20-
export * from './social-media-icons/styles';
20+
export * from './info-call-to-action/InfoCallToAction';
2121
export * from './hero-blank/HeroBlank';
2222
export * from './tag/Tag';
2323
export * from './comments/Comments';

src/components/markdown-renderer/MarkdownRenderer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
StyledParagraph,
1616
} from './styles';
1717
import { slugify } from './slugify';
18-
import { InfoCallToAction } from 'components/info-call-to-action/InfoCallToAction';
18+
import { InfoCallToAction } from '../info-call-to-action/InfoCallToAction';
1919

2020
type MarkdownRendererProps = {
2121
children: React.ReactNode;

0 commit comments

Comments
 (0)