From 280ecb32a294a24d0c0337b76b0e432756036499 Mon Sep 17 00:00:00 2001
From: Mattia <32470461+Megio@users.noreply.github.com>
Date: Wed, 26 Jul 2023 17:09:10 +0200
Subject: [PATCH] fix jsx error (#1315)
* fix jsx error
* tsconfig fix
* format
* added live link and improve performances
* fixed icon
---
starters/shopify-next-tailwind/README.md | 2 +-
starters/shopify-next-tailwind/components/Button.tsx | 6 ++++--
starters/shopify-next-tailwind/next.config.js | 2 ++
starters/shopify-next-tailwind/package.json | 2 +-
starters/shopify-next-tailwind/tsconfig.json | 3 ++-
5 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/starters/shopify-next-tailwind/README.md b/starters/shopify-next-tailwind/README.md
index 0495d4828..e0bc99a29 100644
--- a/starters/shopify-next-tailwind/README.md
+++ b/starters/shopify-next-tailwind/README.md
@@ -100,4 +100,4 @@ git clone https://github.com/thisdot/starter.dev.git
## Demo Implementation
----link live---
+[Live Store](https://shopify-next-tailwind.starter.dev)
diff --git a/starters/shopify-next-tailwind/components/Button.tsx b/starters/shopify-next-tailwind/components/Button.tsx
index da99e3234..8972462ae 100644
--- a/starters/shopify-next-tailwind/components/Button.tsx
+++ b/starters/shopify-next-tailwind/components/Button.tsx
@@ -21,7 +21,7 @@ export const Button = forwardRef(
},
ref
) => {
- const Component: React.ElementType = props?.to ? Link : as;
+ const Component: React.ElementType | null = props?.to ? Link : as;
const baseButtonClasses =
'inline-block rounded font-medium text-center py-2 px-6';
@@ -44,7 +44,9 @@ export const Button = forwardRef(
);
return (
-
+ <>
+
+ >
);
}
);
diff --git a/starters/shopify-next-tailwind/next.config.js b/starters/shopify-next-tailwind/next.config.js
index 7b3d2da24..2117fd2a7 100644
--- a/starters/shopify-next-tailwind/next.config.js
+++ b/starters/shopify-next-tailwind/next.config.js
@@ -2,6 +2,8 @@
const nextConfig = {
experimental: {
serverActions: true,
+ browsersListForSwc: true,
+ legacyBrowsers: false,
},
images: {
dangerouslyAllowSVG: true,
diff --git a/starters/shopify-next-tailwind/package.json b/starters/shopify-next-tailwind/package.json
index 65c24060e..2f6c7c0dd 100644
--- a/starters/shopify-next-tailwind/package.json
+++ b/starters/shopify-next-tailwind/package.json
@@ -7,7 +7,7 @@
"shopify",
"storybook",
"typescript",
- "typescript"
+ "tailwind"
],
"scripts": {
"dev": "next dev",
diff --git a/starters/shopify-next-tailwind/tsconfig.json b/starters/shopify-next-tailwind/tsconfig.json
index e0983a868..b46761478 100644
--- a/starters/shopify-next-tailwind/tsconfig.json
+++ b/starters/shopify-next-tailwind/tsconfig.json
@@ -21,7 +21,8 @@
],
"baseUrl": ".",
"paths": {
- "@/*": ["./*"]
+ "@/*": ["./*"],
+ "react": ["./node_modules/@types/react"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],