Skip to content

Commit

Permalink
fix: cannot query field "align" on type "CoreQuoteAttributes"' (#1946)
Browse files Browse the repository at this point in the history
* - update query fragment on CoreQuote to be compatible with WordPress 6.6

* - update query string

* fix: add legacyBehavior in <Link/>

* chore: update changeset

---------

Co-authored-by: Theo <[email protected]>
  • Loading branch information
jasonbahl and theodesp authored Oct 18, 2024
1 parent 745c89c commit 9011492
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .changeset/smart-pumas-act.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@faustwp/blocks': major
---

Updates the GraphQL fragment associated with the CoreQuote component to be compatible with WordPress 6.6

Adds `legacyBehavior` to CoreButton link to work on Next.js v13.
2 changes: 1 addition & 1 deletion packages/blocks/src/blocks/CoreButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function CoreButton(props: CoreButtonFragmentProps) {
aria-label={attributes?.text}
id={attributes?.anchor}
className={attributes?.cssClassName}>
<Link href={attributes?.url}>
<Link legacyBehavior href={attributes?.url}>
<a
target={linkTarget}
className={attributes?.linkClassName}
Expand Down
4 changes: 2 additions & 2 deletions packages/blocks/src/blocks/CoreQuote.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { getStyles } from '../utils/index.js';

export type CoreQuoteFragmentProps = ContentBlock & {
attributes?: {
align?: string;
textAlign?: string;
anchor?: string;
backgroundColor?: string;
citation?: string;
Expand Down Expand Up @@ -52,7 +52,7 @@ CoreQuote.fragments = {
entry: gql`
fragment CoreQuoteBlockFragment on CoreQuote {
attributes {
align
textAlign
anchor
backgroundColor
citation
Expand Down

0 comments on commit 9011492

Please sign in to comment.