Skip to content

Releases: wpengine/faustjs

@faustjs/[email protected]

01 Mar 19:55
ed0f2da
Compare
Choose a tag to compare

Patch Changes

  • d2b2b39: Fixed previews when trailingSlash is enabled in Next.js config

plugin/faustwp/v0.7.4

14 Feb 18:31
893b19a
Compare
Choose a tag to compare

Patch Changes

  • 1dcd987: Removes unused event callbacks for rewrite rule and post status changes. The is_events_enabled() function has also been removed.
  • 5c69b68: ConditionalTags has been deprecated as it was introduced in an older version of the framework when routing was done from the NextTemplateLoader. Now that we are using Next.js pages for routing, conditionalTags are no longer needed.
  • 7d156ba: Add a documentation link that explains "Features" checkbox settings in more detail

@faustjs/[email protected]

14 Feb 18:24
893b19a
Compare
Choose a tag to compare

Patch Changes

  • 1d386de: Check for FaustContext before calling GQty queries and throw an error if it's not provided.

plugin/faustwp/v0.7.3

26 Jan 17:18
7d75cda
Compare
Choose a tag to compare

Patch Changes

  • ab4a661: Fixed issue where file editor was unable to save

@faustjs/[email protected]

06 Jan 20:04
21231d4
Compare
Choose a tag to compare

Patch Changes

  • c004310: Fixed a bug where expired refresh tokens were not being cleared from the browser cookie, possibly resulting in infinite loops during authentication, or an inability to request authenticated content.

@faustjs/[email protected]

15 Dec 19:38
b43d713
Compare
Choose a tag to compare

Patch Changes

@faustjs/[email protected]

15 Dec 19:38
b43d713
Compare
Choose a tag to compare

Patch Changes

  • c74ce4f: Introduced the usePreviewNode hook to get preview data from any post type. You can use it like so:

    import type { Page, Post } from 'client';
    import { client } from 'client';
    
    export default function Preview() {
      const isLoading = client.useIsLoading();
      const { typeName, node } = client.auth.usePreviewNode();
    
      if (isLoading || node === undefined) {
        return <p>Loading...</p>;
      }
    
      if (node === null) {
        return <p>Post not found</p>;
      }
    
      switch (typeName) {
        case 'Page': {
          const page = node as Page;
          return (
            <>
              <h1>{page.title()}</h1>
              <div dangerouslySetInnerHTML={{ __html: page.content() }} />
            </>
          );
        }
        case 'Post': {
          const post = node as Post;
          return (
            <>
              <h1>{post.title()}</h1>
              <div dangerouslySetInnerHTML={{ __html: post.content() }} />
            </>
          );
        }
        // Add custom post types here as needed
        default: {
          throw new Error(`Unknown post type: ${typeName}`);
        }
      }
    }

    With usePreviewNode, we have deprecated the usePreview hook. It is still available, but it is recommended to use usePreviewNode instead.

  • Updated dependencies [3c1280b]

  • Updated dependencies [3c1280b]

@faustjs/[email protected]

15 Dec 19:38
b43d713
Compare
Choose a tag to compare

Patch Changes

  • 3c1280b: Updated schema.generated.ts to support contentNode for usePreviewNode usage.

@faustjs/[email protected]

08 Dec 14:43
0371b31
Compare
Choose a tag to compare

Minor Changes

  • a044a07: Add file extensions to import statements to fully support ES Modules. Support for Next.js 12 🎉

Patch Changes

@faustjs/[email protected]

08 Dec 14:43
0371b31
Compare
Choose a tag to compare

Minor Changes

  • a044a07: Add file extensions to import statements to fully support ES Modules. Support for Next.js 12 🎉

Patch Changes