Skip to content

Commit

Permalink
Fix font library modal prop typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Vicente Canales committed Sep 10, 2023
1 parent 83ae921 commit e0f3f70
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ import FontFamilyItem from './font-family-item';
import Subtitle from './subtitle';

function FontFamilies() {
const { modalTabOepn, toggleModal, themeFonts, customFonts } =
const { modalTabOpen, toggleModal, themeFonts, customFonts } =
useContext( FontLibraryContext );

return (
<>
{ !! modalTabOepn && (
{ !! modalTabOpen && (
<FontLibraryModal
onRequestClose={ () => toggleModal() }
initialTabName={ modalTabOepn }
initialTabName={ modalTabOpen }
/>
) }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function FontLibraryProvider( { children } ) {
};

// Library Fonts
const [ modalTabOepn, setModalTabOepn ] = useState( false );
const [ modalTabOpen, setModalTabOpen ] = useState( false );
const [ libraryFontSelected, setLibraryFontSelected ] = useState( null );

const baseThemeFonts = baseFontFamilies?.theme
Expand Down Expand Up @@ -116,10 +116,10 @@ function FontLibraryProvider( { children } ) {
: [];

useEffect( () => {
if ( ! modalTabOepn ) {
if ( ! modalTabOpen ) {
setLibraryFontSelected( null );
}
}, [ modalTabOepn ] );
}, [ modalTabOpen ] );

const handleSetLibraryFontSelected = ( font ) => {
// If font is null, reset the selected font
Expand All @@ -141,7 +141,7 @@ function FontLibraryProvider( { children } ) {
};

const toggleModal = ( tabName ) => {
setModalTabOepn( tabName || null );
setModalTabOpen( tabName || null );
};

// Demo
Expand Down Expand Up @@ -327,7 +327,7 @@ function FontLibraryProvider( { children } ) {
uninstallFont,
toggleActivateFont,
getAvailableFontsOutline,
modalTabOepn,
modalTabOpen,
toggleModal,
refreshLibrary,
saveFontFamilies,
Expand Down

0 comments on commit e0f3f70

Please sign in to comment.