refactor(v2): correct some of type errors reported by eslint (#4382)

* fix: correct some of type errors reported by eslint

* fix: remove unnecessary import
This commit is contained in:
Armano 2021-03-12 12:24:22 +01:00 committed by GitHub
parent a39c62f644
commit bfe52cdae3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 32 additions and 21 deletions

View file

@ -6,7 +6,7 @@
*/
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
export const useTitleFormatter = (title?: string | undefined) => {
export const useTitleFormatter = (title?: string | undefined): string => {
const {siteConfig = {}} = useDocusaurusContext();
const {title: siteTitle, titleDelimiter = '|'} = siteConfig;
return title && title.trim().length