refactor: reduce ESLint warnings / better typing (#5242)

* Fix code block children type

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Add return type

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Add types

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Fix return types

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Fix details type

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Fix type

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
This commit is contained in:
Joshua Chen 2021-07-29 23:59:38 +08:00 committed by GitHub
parent a59378ba87
commit 9e615eff02
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 38 additions and 21 deletions

View file

@ -95,7 +95,11 @@ const useAnnouncementBarContextValue = (): AnnouncementBarAPI => {
const AnnouncementBarContext = createContext<AnnouncementBarAPI | null>(null);
export const AnnouncementBarProvider = ({children}: {children: ReactNode}) => {
export const AnnouncementBarProvider = ({
children,
}: {
children: ReactNode;
}): JSX.Element => {
const value = useAnnouncementBarContextValue();
return (
<AnnouncementBarContext.Provider value={value}>