interfaces.ts 700 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. export interface IGood {
  2. _id: string | undefined;
  3. name?: string | undefined;
  4. createdAt: string | undefined;
  5. price?: number;
  6. images?:
  7. | [
  8. {
  9. url: string;
  10. },
  11. ]
  12. | null;
  13. }
  14. export interface IGoodItem {
  15. good: IGood;
  16. routName: string;
  17. }
  18. export interface IGoodDetail {
  19. _id: string | undefined;
  20. name?: string | undefined;
  21. createdAt: string | undefined;
  22. price?: number;
  23. images?:
  24. | [
  25. {
  26. url: string;
  27. },
  28. ]
  29. | null;
  30. description: string | undefined;
  31. }
  32. export interface IGoodsProps {
  33. goodsArr: IGood[] | [];
  34. getGoods: () => void;
  35. }
  36. export interface IGoodsState {
  37. goods: {
  38. goodsArr: IGood[];
  39. };
  40. }