Skip to content

Commit

Permalink
update hint text and clear successful message with a fresh upload
Browse files Browse the repository at this point in the history
  • Loading branch information
madhusudhand committed Sep 27, 2023
1 parent 81e7c64 commit d94b1f4
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ function LocalFonts() {
* @return {void}
*/
const handleFilesUpload = ( files ) => {
setNotice( null );
const uniqueFilenames = new Set();
const selectedFiles = [ ...files ];
const allowedFiles = selectedFiles.filter( ( file ) => {
Expand Down Expand Up @@ -135,7 +136,6 @@ function LocalFonts() {
*/
const handleInstall = async ( fontFaces ) => {
const fontFamilies = makeFamiliesFromFaces( fontFaces );
setNotice( null );
const status = await installFonts( fontFamilies );
if ( status ) {
setNotice( {
Expand Down Expand Up @@ -180,9 +180,9 @@ function LocalFonts() {
<Spacer margin={ 2 } />
<Text className="font-library-modal__upload-area__text">
{ sprintf(
/* translators: %s: allowed font formats: ex: .ttf, .woff and .woff2 */
/* translators: %s: supported font formats: ex: .ttf, .woff and .woff2 */
__(
'Uploaded fonts will appear up in your library and can be used in your theme after that. Formats %s are supported.'
'Uploaded fonts appear in your library and can be used in your theme. Supported formats: %s.'
),
supportedFormats
) }
Expand Down

0 comments on commit d94b1f4

Please sign in to comment.