Refactored index

This commit is contained in:
Dustin Brett
2021-01-16 22:30:30 -08:00
parent d210e43954
commit 8ef89e69d6
3 changed files with 11 additions and 9 deletions

View File

@@ -8,7 +8,6 @@ test('renders index page', () => {
<Index />
</StyledApp>
);
const helloWorldElement = getByText('Hello, world!');
expect(helloWorldElement).toBeInTheDocument();
expect(getByText('Hello, world!')).toBeInTheDocument();
});

View File

@@ -1,11 +1,5 @@
import type { ReactElement } from 'react';
import styled from 'styled-components';
const Title = styled.h1`
color: ${({ theme }) => theme.colors.primary};
font-size: 50px;
text-align: center;
`;
import Title from 'styles/generic/Title';
export default function Home(): ReactElement {
return <Title>Hello, world!</Title>;

9
styles/generic/Title.tsx Normal file
View File

@@ -0,0 +1,9 @@
import styled from 'styled-components';
const Title = styled.h1`
color: ${({ theme }) => theme.colors.primary};
font-size: 50px;
text-align: center;
`;
export default Title;