Skip to content

Commit 13f40d7

Browse files
committed
Update packages and dynamic routes for Next 10
1 parent bd78754 commit 13f40d7

File tree

4 files changed

+215
-224
lines changed

4 files changed

+215
-224
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ Optional plugin:
1717

1818
The current release has been tested and is confirmed working with the following versions:
1919

20-
- WordPress version 5.5.3
20+
- WordPress version 5.6.0
2121
- WooCommerce version 4.8.0
22-
- WP GraphQL version 1.0.3
22+
- WP GraphQL version 1.0.5
2323
- WooGraphQL version 0.6.1
2424

2525
2. For debugging and testing, install either:

components/Product/IndexProducts.component.jsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ const IndexProducts = ({ products }) => {
3030
key={uuidv4()}
3131
className="flex flex-col p-6 md:w-1/2 xl:w-1/4"
3232
>
33-
<Link href="/produkt/[post]" as={`/produkt/${slug}?id=${databaseId}`}>
33+
<Link
34+
href={`/produkt/${encodeURIComponent(
35+
slug
36+
)}?id=${encodeURIComponent(databaseId)}`}
37+
>
3438
<a>
3539
{image ? (
3640
<img
@@ -49,7 +53,12 @@ const IndexProducts = ({ products }) => {
4953
)}
5054
</a>
5155
</Link>
52-
<Link href="/produkt/[post]" as={`/produkt/${slug}?id=${databaseId}`}>
56+
57+
<Link
58+
href={`/produkt/${encodeURIComponent(
59+
slug
60+
)}?id=${encodeURIComponent(databaseId)}`}
61+
>
5362
<a>
5463
<div className="flex justify-center pt-3">
5564
<p className="font-bold text-center cursor-pointer">
@@ -58,7 +67,6 @@ const IndexProducts = ({ products }) => {
5867
</div>
5968
</a>
6069
</Link>
61-
6270
{/* Display sale price when on sale */}
6371
{onSale && (
6472
<>

0 commit comments

Comments
 (0)