import React, {createRef, useEffect} from 'react'; import {Text} from 'react-native'; import {SIZE, WEIGHT} from '../../common/common'; import {useTracked} from '../../provider'; export const HeaderTitle = ({root}) => { const [state, dispatch] = useTracked(); const {colors} = state; let headerTextState = root ? state.headerTextState : state.indHeaderTextState; return ( {headerTextState.heading.slice(0, 1) === '#' ? '#' : null} {headerTextState.heading.slice(0, 1) === '#' ? headerTextState.heading.slice(1) : headerTextState.heading} ); };