TurtleWolfe / devOps

Mongo Express React & Node Docker TypeScript Linux Ubuntu https://github.com/TurtleWolfe/devOps
0 stars 0 forks source link

el.type is undefined #2

Closed TurtleWolfe closed 3 years ago

TurtleWolfe commented 3 years ago

Following LamaDev's Social Media tutorial. Running his API and React front end in separate containers. He connects them in the final video of the series.. so maybe I just need to mock the data? But when I've added stories for all his components, I'm getting the same message of el.type is undefined so I figure it's a common error with a common denominator any advice in the forums?

link to devOps StoryBook

link to the repo

Screenshot from 2021-09-28 12-22-51

import React from 'react';

import { CloseFriend } from './CloseFriend';

export default {
  title: 'Example/CloseFriend',
  component: CloseFriend,
};

const Template = (args) => <CloseFriend {...args} />;

export const LoggedIn = Template.bind({});
LoggedIn.args = {
  user: {},
};

export const LoggedOut = Template.bind({});
LoggedOut.args = {};
TurtleWolfe commented 3 years ago

I just needed to take the brackets off the imports, Post is undefined, but at least it's a new error and I think I understand it, mocking may be an option soon.