Simon Zeyer 9a26d97209 Init DB and Tests with Components
- add Artikel, Kauf, Kategorie Model
- generate Components
- playing with custom components
- add Tailwindcss
2023-11-05 21:35:01 +00:00

36 lines
699 B
JavaScript

import { Link, routes } from '@redwoodjs/router'
import Artikels from 'src/components/Artikel/Artikels'
export const QUERY = gql`
query FindArtikels {
artikels {
id
name
preis
kategorie {id, name}
}
}
`
export const Loading = () => <div>Loading...</div>
export const Empty = () => {
return (
<div className="rw-text-center">
{'No artikels yet. '}
<Link to={routes.newArtikel()} className="rw-link">
{'Create one?'}
</Link>
</div>
)
}
export const Failure = ({ error }) => (
<div className="rw-cell-error">{error?.message}</div>
)
export const Success = ({artikels }) => {
return <Artikels artikels={artikels} />
}