Skip to content

Commit 6882940

Browse files
authored
Merge pull request #349 from w3bdesign/develop
Fix SonarCloud warnings
2 parents 1b67502 + adc18b9 commit 6882940

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

components/Header/Header.component.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ import Navbar from './Navbar.component';
66
* Header for the application.
77
* Adds title and some meta properties
88
*/
9-
const Header = ({title}) => {
9+
const Header = ({ title }) => {
1010
return (
1111
<>
1212
<Head>
13-
<title>Nextjs Ecommerce with Woocommerce {title && title}</title>
13+
<title>Nextjs Ecommerce with WooCommerce {title ? title : ''}</title>
1414
<meta name="description" content="WooCommerce webshop" />
1515
<meta name="keywords" content="Ecommerce, WooCommerce" />
1616
<meta

pages/kategori/[slug].js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const Produkt = ({ categoryName, products }) => {
1616

1717
return (
1818
<>
19-
<Header title={`- ${categoryName && categoryName}`} />
19+
<Header title={`- ${categoryName ? categoryName : ''}`} />
2020
{products ? (
2121
<>
2222
<PageTitle title={categoryName} marginleft="50" />

pages/produkt/[slug].js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const Produkt = ({ product }) => {
1515

1616
return (
1717
<>
18-
<Header title={`- ${product.name && product.name}`} />
18+
<Header title={`- ${product.name ? product.name : ''}`} />
1919
{product ? (
2020
<SingleProduct product={product} />
2121
) : (

0 commit comments

Comments
 (0)