Skip to content

Commit

Permalink
Locale Switcher: Fix JS error and update heading style
Browse files Browse the repository at this point in the history
A JS error was thrown when logged out due to the button in the admin bar being missing.

Also changes the modal title font from Garamond to Inter.
  • Loading branch information
adamwoodnz committed Jul 9, 2024
1 parent fa88c03 commit 19c679e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion wp-content/mu-plugins/pub/locale-switcher/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const LocaleSwitcher = ( props ) => {
const closeModal = () => setOpen( false );
const [ value, setValue ] = useState( false );

externalButton.addEventListener( 'click', ( event ) => {
externalButton?.addEventListener( 'click', ( event ) => {
event.preventDefault();
openModal();
} );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,9 @@

.components-modal__header {
padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30) 0;

.components-modal__header-heading {
font-family: var(--wp--preset--font-family--inter);
line-height: var(--wp--custom--heading--level-1--typography--line-height);
}
}

0 comments on commit 19c679e

Please sign in to comment.