From 6d9478f8f72d1d43c2a483cb1a8572d2b14853cd Mon Sep 17 00:00:00 2001 From: a-kriya <26761352+a-kriya@users.noreply.github.com> Date: Sun, 22 Jan 2023 08:47:27 +0530 Subject: [PATCH] chore: fix typos across the codebase (#402) --- packages/core/dev-test/index.html | 2 +- packages/core/src/backend.ts | 12 +++--- packages/core/src/components/App/Header.tsx | 6 +-- .../Collection/Entries/EntryCard.tsx | 10 ++--- .../Collection/Entries/EntryListing.tsx | 20 +++++----- .../EditorControlPane/EditorControlPane.tsx | 4 +- .../EditorPreviewPane/EditorPreviewPane.tsx | 40 +++++++++---------- packages/core/src/formats/util/j-toml.js | 6 +-- packages/core/src/lib/auth/pkce-oauth.ts | 2 +- packages/core/src/lib/formatters.ts | 6 +-- packages/core/src/lib/util/collection.util.ts | 14 +++---- .../src/media-libraries/cloudinary/index.ts | 2 +- .../core/src/widgets/file/withFileControl.tsx | 2 +- .../core/src/widgets/map/withMapControl.tsx | 2 +- packages/demo/public/index.html | 2 +- .../docs/add-to-your-site-bundling.mdx | 2 +- 16 files changed, 66 insertions(+), 66 deletions(-) diff --git a/packages/core/dev-test/index.html b/packages/core/dev-test/index.html index 45f1ff75..6274da6d 100644 --- a/packages/core/dev-test/index.html +++ b/packages/core/dev-test/index.html @@ -27,7 +27,7 @@ _faqs: { 'what-is-static-cms.md': { content: - '---\ntitle: What is Static CMS?\ndate: 2015-11-02T00:00.000Z\n---\n\n# Static CMS is Content Manager for Static Site Generators\n\nStatic sites are many times faster, cheaper and safer and traditional dynamic websites.\n\nModern static site generators like Jekyll, Middleman, Roots or Hugo are powerful publishing and development systems, but when we build sites for non-technical users, we need a layer on top of them.\n\nStatic CMS is there to let your marketing team push new content to your public site, or to let technical writers work on your documentation.\n\nStatic CMS integrates with Git and turns normal content editors into git comitters.\n\n', + '---\ntitle: What is Static CMS?\ndate: 2015-11-02T00:00.000Z\n---\n\n# Static CMS is Content Manager for Static Site Generators\n\nStatic sites are many times faster, cheaper and safer and traditional dynamic websites.\n\nModern static site generators like Jekyll, Middleman, Roots or Hugo are powerful publishing and development systems, but when we build sites for non-technical users, we need a layer on top of them.\n\nStatic CMS is there to let your marketing team push new content to your public site, or to let technical writers work on your documentation.\n\nStatic CMS integrates with Git and turns normal content editors into git committers.\n\n', }, 'what-is-jam-stack.md': { content: diff --git a/packages/core/src/backend.ts b/packages/core/src/backend.ts index 1e1aa98d..e96aef12 100644 --- a/packages/core/src/backend.ts +++ b/packages/core/src/backend.ts @@ -35,7 +35,7 @@ import { selectFieldsComments, selectFileEntryLabel, selectFolderEntryExtension, - selectInferedField, + selectInferredField, selectMediaFolders, } from './lib/util/collection.util'; import { selectMediaFilePath, selectMediaFilePublicPath } from './lib/util/media.util'; @@ -526,12 +526,12 @@ export class Backend { }); } else { searchFields = [ - selectInferedField(collection, 'title'), - selectInferedField(collection, 'shortTitle'), - selectInferedField(collection, 'author'), + selectInferredField(collection, 'title'), + selectInferredField(collection, 'shortTitle'), + selectInferredField(collection, 'author'), ...summaryFields.map(elem => { if (dateParsers[elem]) { - return selectInferedField(collection, 'date'); + return selectInferredField(collection, 'date'); } return elem; }), @@ -555,7 +555,7 @@ export class Backend { if (errors.length > 0) { // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore - throw new Error({ message: 'Errors ocurred while searching entries locally!', errors }); + throw new Error({ message: 'Errors occurred while searching entries locally!', errors }); } const hits = entries diff --git a/packages/core/src/components/App/Header.tsx b/packages/core/src/components/App/Header.tsx index 630f095d..8b856218 100644 --- a/packages/core/src/components/App/Header.tsx +++ b/packages/core/src/components/App/Header.tsx @@ -86,7 +86,7 @@ const Header = ({ createNewEntry(collectionName); }, []); - const createableCollections = useMemo( + const creatableCollections = useMemo( () => Object.values(collections).filter(collection => 'folder' in collection ? collection.create ?? false : false, @@ -123,7 +123,7 @@ const Header = ({ ) : null} - {createableCollections.length > 0 && ( + {creatableCollections.length > 0 && (