🚨 Add eslint and stylelint and format

This commit is contained in:
nikolark committed 2021-10-30 17:42:21 +02:00
1 parent f0656b34e9
commit 2ed0c57b97
13 files changed
+6025 -74

No files matched your search

+14 -10
View File
@@ -1,17 +1,21 @@
import React from "react";
import {Product, useAllProductsQuery} from '../types';
import { Product, useAllProductsQuery } from "../types";
export const Register: React.FC = () => {
const { data, error, loading } = useAllProductsQuery({variables:{active: true}});
if(error) {
console.log('🔥', error)
const { data, error, loading } = useAllProductsQuery({ variables: { active: true } });
if (error) {
console.log("🔥", error);
return null;
}
if(loading) {
return <div>...</div>
if (loading) {
return <div>...</div>;
}
return (<div>{data?.allProducts.map((product: Product) => {
return <div key={product.id}>{product.name}</div>
})} </div>)
};
return (
<div>
{data?.allProducts.map((product: Product) => {
return <div key={product.id}>{product.name}</div>;
})}{" "}
</div>
);
};