summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--components/layout.tsx8
-rw-r--r--components/topnav.tsx7
-rw-r--r--data/publications.tsx2
-rw-r--r--lib/theme.tsx10
-rw-r--r--pages/_app.tsx2
-rw-r--r--pages/index.tsx7
6 files changed, 27 insertions, 9 deletions
diff --git a/components/layout.tsx b/components/layout.tsx
index b3506ea..f137cb4 100644
--- a/components/layout.tsx
+++ b/components/layout.tsx
@@ -1,6 +1,12 @@
import TopNav from '../components/topnav'
import { Container, Box } from '@chakra-ui/react'
-export default function Layout({ children }) {
+import ReactNode from 'react'
+
+type Props = {
+ children?: any
+}
+
+export default function Layout({ children } : Props) {
return (
<>
<TopNav/>
diff --git a/components/topnav.tsx b/components/topnav.tsx
index 3e729ba..a46f38f 100644
--- a/components/topnav.tsx
+++ b/components/topnav.tsx
@@ -19,7 +19,12 @@ import {
import { GiHamburgerMenu } from "react-icons/gi"
import { DiGithubBadge } from "react-icons/di"
-function NavLink({to, children}) {
+type NavLinkType = {
+ to: string,
+ children: any,
+}
+
+function NavLink({to, children} : NavLinkType) {
return <a href={to} className={`mx-4`}>
{children}
</a>
diff --git a/data/publications.tsx b/data/publications.tsx
index 099841d..b764957 100644
--- a/data/publications.tsx
+++ b/data/publications.tsx
@@ -1,4 +1,4 @@
-type Publications = {
+type Publication = {
name: string,
url: string,
}
diff --git a/lib/theme.tsx b/lib/theme.tsx
index 08f269f..8b65ac2 100644
--- a/lib/theme.tsx
+++ b/lib/theme.tsx
@@ -1,21 +1,23 @@
import { extendTheme } from "@chakra-ui/react"
import { mode } from '@chakra-ui/theme-tools'
+type propsType = any
+
const styles = {
- global: props => ({
+ global: (props : propsType) => {
body: {
//bg: mode('#d5d6db', '#24283b')(props),
//color: mode('#0f4b6e', '#7dcfff')(props),
}
- })
+ }
}
const components = {
Link: {
- baseStyle: props => ({
+ baseStyle: (props : propsType) => {
//color: mode('#34548a', '##34548a')(props),
textUnderlineOffset: 3
- })
+ }
},
Heading: {
baseStyle: {
diff --git a/pages/_app.tsx b/pages/_app.tsx
index 1c06149..da7cb05 100644
--- a/pages/_app.tsx
+++ b/pages/_app.tsx
@@ -1,5 +1,5 @@
import { ChakraProvider } from '@chakra-ui/react'
-import theme from '../lib/theme.tsx'
+import theme from '../lib/theme'
import type { AppProps } from 'next/app'
import '@fontsource/lato/400.css'
diff --git a/pages/index.tsx b/pages/index.tsx
index 1212d08..4477d0b 100644
--- a/pages/index.tsx
+++ b/pages/index.tsx
@@ -18,7 +18,12 @@ import {
import { AiFillGithub,AiFillMediumCircle} from "react-icons/ai";
import Publications from "../data/publications"
-const BioEntry = ({date, description}) => {
+type BioEntryType = {
+ date: string,
+ description: string
+}
+
+const BioEntry = ({date, description} : BioEntryType) => {
return <HStack spacing="6" alignItems="start">
<Box fontWeight='bolder'>{date}</Box>
<Box>{description}</Box>