Skip to content

Commit

Permalink
fix jsx error (#1315)
Browse files Browse the repository at this point in the history
* fix jsx error

* tsconfig fix

* format

* added live link and improve performances

* fixed icon
  • Loading branch information
Megio authored Jul 26, 2023
1 parent 9b6537e commit 280ecb3
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion starters/shopify-next-tailwind/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
6 changes: 4 additions & 2 deletions starters/shopify-next-tailwind/components/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -44,7 +44,9 @@ export const Button = forwardRef(
);

return (
<Component className={styles} {...props} href={props?.to} ref={ref} />
<>
<Component className={styles} {...props} href={props?.to} ref={ref} />
</>
);
}
);
Expand Down
2 changes: 2 additions & 0 deletions starters/shopify-next-tailwind/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
const nextConfig = {
experimental: {
serverActions: true,
browsersListForSwc: true,
legacyBrowsers: false,
},
images: {
dangerouslyAllowSVG: true,
Expand Down
2 changes: 1 addition & 1 deletion starters/shopify-next-tailwind/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"shopify",
"storybook",
"typescript",
"typescript"
"tailwind"
],
"scripts": {
"dev": "next dev",
Expand Down
3 changes: 2 additions & 1 deletion starters/shopify-next-tailwind/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
],
"baseUrl": ".",
"paths": {
"@/*": ["./*"]
"@/*": ["./*"],
"react": ["./node_modules/@types/react"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
Expand Down

0 comments on commit 280ecb3

Please sign in to comment.