Skip to content

Commit 9011492

Browse files
jasonbahltheodesp
andauthored
fix: cannot query field "align" on type "CoreQuoteAttributes"' (#1946)
* - 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]>
1 parent 745c89c commit 9011492

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

.changeset/smart-pumas-act.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@faustwp/blocks': major
3+
---
4+
5+
Updates the GraphQL fragment associated with the CoreQuote component to be compatible with WordPress 6.6
6+
7+
Adds `legacyBehavior` to CoreButton link to work on Next.js v13.

packages/blocks/src/blocks/CoreButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export function CoreButton(props: CoreButtonFragmentProps) {
3535
aria-label={attributes?.text}
3636
id={attributes?.anchor}
3737
className={attributes?.cssClassName}>
38-
<Link href={attributes?.url}>
38+
<Link legacyBehavior href={attributes?.url}>
3939
<a
4040
target={linkTarget}
4141
className={attributes?.linkClassName}

packages/blocks/src/blocks/CoreQuote.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { getStyles } from '../utils/index.js';
66

77
export type CoreQuoteFragmentProps = ContentBlock & {
88
attributes?: {
9-
align?: string;
9+
textAlign?: string;
1010
anchor?: string;
1111
backgroundColor?: string;
1212
citation?: string;
@@ -52,7 +52,7 @@ CoreQuote.fragments = {
5252
entry: gql`
5353
fragment CoreQuoteBlockFragment on CoreQuote {
5454
attributes {
55-
align
55+
textAlign
5656
anchor
5757
backgroundColor
5858
citation

0 commit comments

Comments
 (0)