@@ -17,13 +17,13 @@ export const layout = {
1717 maxWidth : 1200 ,
1818} ;
1919
20- export const useLayout = ( ) => {
20+ export function useLayout ( ) {
2121 const { width } = useWindowDimensions ( ) ;
2222 return {
2323 isSmallScreen : width < 800 ,
2424 isBelowMaxWidth : width < layout . maxWidth ,
2525 } ;
26- } ;
26+ }
2727
2828export const colors = {
2929 primary : '#61DAFB' ,
@@ -93,8 +93,8 @@ type CustomTextProps = TextProps &
9393 numberOfLines ?: number ;
9494 } > ;
9595
96- const createTextComponent = ( Element : ComponentType < TextProps > , textStyle ?: TextStyles ) => {
97- const TextComponent = ( { children, style, id, numberOfLines } : CustomTextProps ) => {
96+ function createTextComponent ( Element : ComponentType < TextProps > , textStyle ?: TextStyles ) {
97+ function TextComponent ( { children, style, id, numberOfLines } : CustomTextProps ) {
9898 const { isDark } = useContext ( CustomAppearanceContext ) ;
9999
100100 const elementStyle = Element ?. displayName
@@ -109,12 +109,12 @@ const createTextComponent = (Element: ComponentType<TextProps>, textStyle?: Text
109109 { children }
110110 </ Element >
111111 ) ;
112- } ;
112+ }
113113
114114 TextComponent . displayName = `TextComponent(${ Element . displayName ?? Element . name ?? 'Unknown' } )` ;
115115
116116 return TextComponent ;
117- } ;
117+ }
118118
119119export const H1 = createTextComponent ( HtmlElements . H1 , textStyles . h1 ) ;
120120export const H2 = createTextComponent ( HtmlElements . H2 , textStyles . h2 ) ;
0 commit comments