Skip to content

Commit 120119f

Browse files
committed
Removing styled components and doing some cleaning up
1 parent a059e50 commit 120119f

29 files changed

+213
-332
lines changed

gatsby-config.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ module.exports = {
4343
icon: "src/images/rentcap2.svg" // This path is relative to the root of the site.
4444
}
4545
},
46-
`gatsby-plugin-sass`,
47-
`gatsby-plugin-styled-components`
46+
`gatsby-plugin-sass`
4847
]
4948
};

gatsby-ssr.js

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import React from "react";
2+
import { Provider } from "react-redux";
3+
import initStore from "./src/methods/initStore";
4+
import { I18nextProvider } from "react-i18next";
5+
import i18n from "./src/methods/i18n";
6+
7+
const store = initStore();
8+
9+
export const wrapRootElement = ({ element }) => (
10+
<Provider store={store}>
11+
<I18nextProvider i18n={i18n}>{element}</I18nextProvider>
12+
</Provider>
13+
);

package-lock.json

+9-121
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+5-3
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,13 @@
1313
"@mdx-js/loader": "^1.4.5",
1414
"@mdx-js/mdx": "^1.4.5",
1515
"@mdx-js/react": "^1.4.5",
16-
"babel-plugin-styled-components": "^1.10.6",
1716
"gatsby": "^2.15.20",
1817
"gatsby-image": "^2.2.8",
1918
"gatsby-plugin-manifest": "^2.2.18",
2019
"gatsby-plugin-mdx": "^1.0.43",
2120
"gatsby-plugin-offline": "^2.2.4",
2221
"gatsby-plugin-react-helmet": "^3.1.3",
2322
"gatsby-plugin-sharp": "^2.2.9",
24-
"gatsby-plugin-styled-components": "^3.1.8",
2523
"gatsby-source-filesystem": "^2.1.8",
2624
"gatsby-transformer-sharp": "^2.2.16",
2725
"i18next": "^19.0.1",
@@ -36,7 +34,6 @@
3634
"react-typography": "^0.16.19",
3735
"redux": "^4.0.4",
3836
"redux-thunk": "^2.3.0",
39-
"styled-components": "^4.4.0",
4037
"typography": "^0.16.19",
4138
"typography-theme-lincoln": "^0.16.19"
4239
},
@@ -49,5 +46,10 @@
4946
"repository": {
5047
"type": "git",
5148
"url": "https://github.com/Rent-Cap/website"
49+
},
50+
"husky": {
51+
"hooks": {
52+
"pre-commit": "pretty-quick --staged"
53+
}
5254
}
5355
}

src/components/Buttons.js

+12-22
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,18 @@
11
import React from "react";
2-
import styled from "styled-components";
32
import { Link, navigate } from "gatsby";
3+
import "../styles/buttons.scss";
44

5-
export const StyledPrimaryButton = styled.button`
6-
display: inline-block;
7-
border-radius: 10px;
8-
background: #ffcc00;
9-
color: black;
10-
padding: 28px 80px;
11-
font-size: 24px;
12-
line-height: 33px;
13-
font-weight: 700;
14-
display: inline-block;
15-
width: 100%;
16-
cursor: pointer;
17-
@media screen and (min-width: 767px) {
18-
width: auto;
19-
}
20-
`;
21-
22-
const StyledSecondaryButton = styled.button`
23-
border-radius: 10px;
24-
border: 4px solid purple;
25-
`;
5+
const DefaultButton = ({ className, children, type = "button", ...props }) => (
6+
<button type={type} className={`button ${className}`} {...props}>
7+
{children}
8+
</button>
9+
);
10+
export const StyledPrimaryButton = props => (
11+
<DefaultButton className="primaryButton" {...props}></DefaultButton>
12+
);
13+
export const StyledSecondaryButton = props => (
14+
<DefaultButton className="secondaryButton" {...props}></DefaultButton>
15+
);
2616

2717
export const SecondaryButton = ({ to, children }) => {
2818
return (

src/components/Footer.js

+3-14
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,12 @@
11
import React from "react";
2-
import styled from "styled-components";
3-
4-
const StyledFooter = styled.footer`
5-
display: inline-grid;
6-
grid-template-columns: inherit;
7-
p {
8-
font-size: 0.8rem;
9-
line-height: 0.9rem;
10-
grid-column-start: 2;
11-
grid-column-end: -2;
12-
}
13-
`;
2+
import "../styles/footer.scss";
143

154
const Footer = () => (
16-
<StyledFooter>
5+
<footer>
176
<p>
187
The information contained on this website is provided for informational
198
purposes only, and should not be considered legal advice on any matter
209
</p>
21-
</StyledFooter>
10+
</footer>
2211
);
2312
export default Footer;

0 commit comments

Comments
 (0)