Skip to content

Releases: wpengine/faustjs

@faustjs/react@0.15.1

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

Patch Changes

  • 3c1280b: Updated client to support contentNode for usePreviewNode usage.
  • Updated dependencies [3c1280b]
    • @faustjs/core@0.15.1

@faustjs/next@0.15.1

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/react@0.15.1
    • @faustjs/core@0.15.1

@faustjs/core@0.15.1

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/react@0.15.0

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

  • Updated dependencies [a044a07]
    • @faustjs/core@0.15.0

@faustjs/next@0.15.0

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

  • Updated dependencies [a044a07]
    • @faustjs/core@0.15.0
    • @faustjs/react@0.15.0

@faustjs/core@0.15.0

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 🎉

plugin/faustwp/v0.7.1

02 Dec 21:53
c925f3b
Compare
Choose a tag to compare

Patch Changes

  • f948c04: Fixed plugin icon SVG display issue in Chrome #683

plugin/faustwp/v0.7.0

02 Dec 16:35
5cf72e4
Compare
Choose a tag to compare

Minor Changes

  • Changed the plugin name to FaustWP.
  • Changed all internal PHP function names to use namespaces.
  • Changed the WP_HEADLESS_SECRET_KEY constant to FAUSTWP_SECRET_KEY.
  • Changed the authentication endpoint namespace from wpac/v1 to faustwp/v1
  • Changed settings option name from wpe_headless to faustwp_settings
  • Changed the following filter names:
    • wpe_headless_setting to faustwp_setting
    • wpe_headless_settings to faustwp_settings
    • wpe_headless_domain_replacement_enabled to faustwp_domain_replacement_enabled
  • Changed the text domain to faustwp.
  • Changed minimum required PHP version to 7.2.
  • Changed minimum required WordPress version to 5.7.
  • Changed the hook used for public route redirection.
  • Fixed the "headless post preview" link on the FaustWP settings page.
  • Fixed "unexpected output" error during plugin activation.
  • Fixed skipped domain replacement in GraphQL responses that include generalSettings.
  • Added LICENSE file.

@faustjs/react@0.14.0

02 Dec 15:30
eb76ca2
Compare
Choose a tag to compare

Patch Changes

  • Updated dependencies [dc936a5]
    • @faustjs/core@0.14.0

@faustjs/next@0.14.0

02 Dec 15:30
eb76ca2
Compare
Choose a tag to compare

Patch Changes

  • Updated dependencies [dc936a5]
    • @faustjs/core@0.14.0
    • @faustjs/react@0.14.0