From 3adc5d3aafd503d2eb78f16a93b18799e5f7d4d7 Mon Sep 17 00:00:00 2001 From: Bastian Ike Date: Fri, 17 Jul 2020 16:10:33 +0200 Subject: [PATCH] fix typecheck --- public/index.html | 27 +++++---------------------- public/manifest.json | 25 ------------------------- src/components/Badge/Badge.tsx | 2 +- src/components/SetTitle.tsx | 18 ++++++------------ 4 files changed, 12 insertions(+), 60 deletions(-) delete mode 100644 public/manifest.json diff --git a/public/index.html b/public/index.html index c17ef27..927a36e 100644 --- a/public/index.html +++ b/public/index.html @@ -4,36 +4,19 @@ - + + + - - React App + AOE Technology Radar - +
- diff --git a/public/manifest.json b/public/manifest.json deleted file mode 100644 index 080d6c7..0000000 --- a/public/manifest.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "short_name": "React App", - "name": "Create React App Sample", - "icons": [ - { - "src": "favicon.ico", - "sizes": "64x64 32x32 24x24 16x16", - "type": "image/x-icon" - }, - { - "src": "logo192.png", - "type": "image/png", - "sizes": "192x192" - }, - { - "src": "logo512.png", - "type": "image/png", - "sizes": "512x512" - } - ], - "start_url": ".", - "display": "standalone", - "theme_color": "#000000", - "background_color": "#ffffff" -} diff --git a/src/components/Badge/Badge.tsx b/src/components/Badge/Badge.tsx index 0a36e0f..1570591 100644 --- a/src/components/Badge/Badge.tsx +++ b/src/components/Badge/Badge.tsx @@ -9,7 +9,7 @@ type BadgeProps = { }; export default function Badge({ onClick, big, type, children }: React.PropsWithChildren) { - const Comp = typeof onClick ? 'a' : 'span'; + const Comp = onClick ? 'a' : 'span'; return ( void } -export default function SetTitle({title, onSetTitle}: SetTitleProps) { - const [onSetTitleState, setOnSetTitleState] = useState(() => onSetTitle) - - if (onSetTitle) { - setOnSetTitleState(onSetTitle) - } - - if (onSetTitleState) { - onSetTitleState(title) - } +export default function SetTitle({title}: SetTitleProps) { + useEffect(() => { + document.title = `${title} | ${radarName}` + }, [title]) return null; }