mirror of
https://github.com/Stone-Red-Code/website.git
synced 2026-09-04 17:25:59 +02:00
Add types for react and tsconfig
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
|
||||
import { Link } from "gatsby";
|
||||
import PropTypes from "prop-types";
|
||||
import React from "react";
|
||||
import * as React from "react";
|
||||
import icon from "./icon.png";
|
||||
import { HeaderWrapper } from "./styles";
|
||||
|
||||
const Navbar = ({ siteTitle }) => (
|
||||
// @todo maybe find alternative type for data
|
||||
const Navbar = ({ siteTitle }: any) => (
|
||||
<HeaderWrapper>
|
||||
<div
|
||||
style={{
|
||||
@@ -34,11 +33,11 @@ const Navbar = ({ siteTitle }) => (
|
||||
)
|
||||
|
||||
Navbar.propTypes = {
|
||||
siteTitle: PropTypes.string,
|
||||
siteTitle: String
|
||||
}
|
||||
|
||||
Navbar.defaultProps = {
|
||||
siteTitle: ``,
|
||||
}
|
||||
|
||||
export default Navbar;
|
||||
export default Navbar;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import * as React from "react"
|
||||
import PropTypes from "prop-types"
|
||||
import React from "react"
|
||||
import Helmet from "react-helmet"
|
||||
import { useStaticQuery, graphql } from "gatsby"
|
||||
|
||||
@@ -67,9 +66,9 @@ const SEO = ({ description = "", lang = "en", meta = [], title }: SEOProps) => {
|
||||
name: `twitter:description`,
|
||||
content: metaDescription,
|
||||
},
|
||||
].concat(meta)}
|
||||
]}
|
||||
/>
|
||||
)
|
||||
}
|
||||
};
|
||||
|
||||
export default SEO
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import * as React from "react";
|
||||
import React from "react";
|
||||
import { graphql } from "gatsby";
|
||||
import Layout from "../components/Layout";
|
||||
|
||||
const LanguagePost = ({ data }) => {
|
||||
// @todo maybe find alternative type for data
|
||||
const LanguagePost = ({ data }: any) => {
|
||||
const { html } = data.file.post;
|
||||
console.log(data)
|
||||
return (
|
||||
@@ -26,4 +27,4 @@ export const query = graphql`
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
||||
`
|
||||
|
||||
Reference in New Issue
Block a user