From d5c99fe05ebad8b3cbd28d5078be4826bb0585e6 Mon Sep 17 00:00:00 2001 From: Muthu Kumar Date: Sun, 26 Jun 2022 01:29:38 +0530 Subject: [PATCH] chore: misc Signed-off-by: Muthu Kumar --- src/components/Container.tsx | 2 +- src/components/Menu.tsx | 2 +- src/components/RevealChildren.tsx | 2 +- src/components/Timeline.tsx | 4 ++-- src/pages/main/Contact.tsx | 2 +- src/pages/main/Exp.tsx | 6 +++--- src/pages/main/Home.tsx | 2 +- src/pages/main/Live.tsx | 2 +- src/pages/main/Projects.tsx | 4 ++-- svg.d.ts | 2 +- 10 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/components/Container.tsx b/src/components/Container.tsx index feb8f0c..38a0704 100644 --- a/src/components/Container.tsx +++ b/src/components/Container.tsx @@ -10,7 +10,7 @@ import useMediaQuery from "../util/useMediaQuery"; const [timer, clear] = getTimeout(); -const Container: React.FunctionComponent<{ +const Container: React.FC<{ children: (string | React.DetailedReactHTMLElement | React.ReactElement)[]; hideNav?: boolean; arrowReversed?: boolean; diff --git a/src/components/Menu.tsx b/src/components/Menu.tsx index a3dab31..6ff3b59 100644 --- a/src/components/Menu.tsx +++ b/src/components/Menu.tsx @@ -61,7 +61,7 @@ const mobileMenu = css` } `; -const Menu: React.FunctionComponent<{ show?: boolean; setShowMenu: (show: boolean) => void }> = ({ +const Menu: React.FC<{ show?: boolean; setShowMenu: (show: boolean) => void }> = ({ show = false, setShowMenu, }) => { diff --git a/src/components/RevealChildren.tsx b/src/components/RevealChildren.tsx index 04b9c21..33cf6b1 100644 --- a/src/components/RevealChildren.tsx +++ b/src/components/RevealChildren.tsx @@ -1,7 +1,7 @@ import React from "react"; import { motion } from "framer-motion"; -const RevealChildren: React.FunctionComponent<{ +const RevealChildren: React.FC<{ type: "div" | "span" | "li"; children: React.ReactChild[]; show: boolean; diff --git a/src/components/Timeline.tsx b/src/components/Timeline.tsx index 4712ad3..44117c3 100644 --- a/src/components/Timeline.tsx +++ b/src/components/Timeline.tsx @@ -86,7 +86,7 @@ const tlcontainer = css` } `; -const Unit: React.FunctionComponent<{ contents: TimelineUnit }> = ({ contents }) => { +const Unit: React.FC<{ contents: TimelineUnit }> = ({ contents }) => { const date = useMemo(() => new Date(contents.date), [contents.date]); return ( @@ -116,7 +116,7 @@ const Unit: React.FunctionComponent<{ contents: TimelineUnit }> = ({ contents }) ); }; -const Timeline: React.FunctionComponent<{ contents: TimelineUnits }> = ({ contents }) => { +const Timeline: React.FC<{ contents: TimelineUnits }> = ({ contents }) => { const current = useMemo(() => new Date(), []); return ( diff --git a/src/pages/main/Contact.tsx b/src/pages/main/Contact.tsx index edf8013..3c7be36 100644 --- a/src/pages/main/Contact.tsx +++ b/src/pages/main/Contact.tsx @@ -34,7 +34,7 @@ const CONTACT: Contact = { }, }; -const Home: React.FunctionComponent = () => { +const Home: React.FC = () => { const [contact, setContact] = useState(CONTACT); useEffect(() => { diff --git a/src/pages/main/Exp.tsx b/src/pages/main/Exp.tsx index 4ba6d6a..8105be0 100644 --- a/src/pages/main/Exp.tsx +++ b/src/pages/main/Exp.tsx @@ -27,7 +27,7 @@ const exp = [ }, ]; -const Circle: React.FunctionComponent = () => ( +const Circle: React.FC = () => (
= ({ title, location, position, year }) => { +const ExpUnit: React.FC = ({ title, location, position, year }) => { return (
{ const age = getAge("27 May 1995"); -const Exp: React.FunctionComponent = () => { +const Exp: React.FC = () => { return (

I’m a {age} year old developer from Chennai, India.

diff --git a/src/pages/main/Home.tsx b/src/pages/main/Home.tsx index f2643a8..50dc58a 100644 --- a/src/pages/main/Home.tsx +++ b/src/pages/main/Home.tsx @@ -2,7 +2,7 @@ import React from "react"; import Container from "../../components/Container"; import Dashed from "../../components/Dashed"; -const Home: React.FunctionComponent = () => { +const Home: React.FC = () => { return (

MKRhere

diff --git a/src/pages/main/Live.tsx b/src/pages/main/Live.tsx index 67854b2..ac66fd2 100644 --- a/src/pages/main/Live.tsx +++ b/src/pages/main/Live.tsx @@ -11,7 +11,7 @@ type LiveInfo = videoID: string; }; -const Live: React.FunctionComponent = () => { +const Live: React.FC = () => { const [tl, setTl] = useState([]); const [liveInfo, setLiveInfo] = useState({ live: false }); diff --git a/src/pages/main/Projects.tsx b/src/pages/main/Projects.tsx index 6005f2c..8d5f5de 100644 --- a/src/pages/main/Projects.tsx +++ b/src/pages/main/Projects.tsx @@ -55,7 +55,7 @@ type Project = { tags: string[]; }; -const ProjectUnit: React.FunctionComponent = ({ title, url, description, cat, tags }) => { +const ProjectUnit: React.FC = ({ title, url, description, cat, tags }) => { return (
= ({ title, url, description ); }; -const Exp: React.FunctionComponent = () => { +const Exp: React.FC = () => { return (

What else have I built?

diff --git a/svg.d.ts b/svg.d.ts index 60ca27b..a2401af 100644 --- a/svg.d.ts +++ b/svg.d.ts @@ -1,7 +1,7 @@ declare module "*.svg" { import * as React from "react"; - export const ReactComponent: React.FunctionComponent< + export const ReactComponent: React.FC< React.SVGProps & { title?: string; ref?: React.Ref | undefined } >; }