ssc-oscar / DRE

MIT License
4 stars 10 forks source link

Created Sampling form #35

Closed atutko2 closed 4 years ago

atutko2 commented 4 years ago

Sorry it took so long. This is a base version of the code meant for sampling.

audrism commented 4 years ago

Adam, For some reason http://worldofcode.org/sampling crashes on the client side:

Uncaught TypeError: _common_Headers_js__WEBPACK_IMPORTED_MODULE_6__.default[this.props.location.pathname] is undefined render App.js:34 React 16

index.js:51 js app.js:1542 __webpack_require__ app.js:790 fn app.js:101 0 app.js:27649 __webpack_require__ app.js:790 app.js:857 app.js:860 How should this.props.location.pathname be defined?
atutko2 commented 4 years ago

I don’t think it’s the path name exactly that is undefined because a lot of that is done through React itself. I may have to push some more code and create another pull request. I think I might not have added the necessary App.js to my repository. I will look

On Nov 1, 2020, at 10:15 PM, Audris Mockus notifications@github.com wrote:



[External Email]

Adam, For some reason http://worldofcode.org/sampling crashes on the client side:

Uncaught TypeError: common_Headers_js__WEBPACK_IMPORTED_MODULE6.default[this.props.location.pathname] is undefined render App.js:34 React 16 index.js:51 js app.js:1542 webpack_require app.js:790 fn app.js:101 0 app.js:27649 webpack_require app.js:790 app.js:857 app.js:860

How should this.props.location.pathname be defined?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/ssc-oscar/DRE/pull/35#issuecomment-720213410, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALC72JJDIWIL2QLQSIKDXUTSNYP4VANCNFSM4TBKWZGQ.

sylviesworld commented 4 years ago

I fixed this. When you make a page in react you have to create a path extension in DRE/client/app/components/common/Headers.js and then you need to tell react which page to render when you navigate to that path in DRE/client/app/index.js

atutko2 commented 4 years ago

Thanks Dylan! That was what I thought might have happened but I’ve been swamped with other things and haven’t had the chance to look.

Adam

On Nov 5, 2020, at 12:02 AM, Dylan Lomax notifications@github.com wrote:



[External Email]

I fixed this. When you make a page in react you have to create a path extension in DRE/client/app/components/common/Headers.js and then you need to tell react which page to render when you navigate to that path in DRE/client/app/index.js

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/ssc-oscar/DRE/pull/35#issuecomment-722142794, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALC72JN34ZIP53CJ6JTNX6DSOIWX5ANCNFSM4TBKWZGQ.