This repository was archived by the owner on Jul 12, 2019. It is now read-only.
File tree 3 files changed +11
-13
lines changed
3 files changed +11
-13
lines changed Original file line number Diff line number Diff line change @@ -20,23 +20,20 @@ class App extends Component {
20
20
21
21
render ( ) {
22
22
23
- const {
24
- cookies,
25
- history
26
- } = this . props ;
23
+ const props = this . props ;
27
24
28
25
return (
29
26
< div >
30
27
< Switch >
31
28
< Route exact path = "/" component = { Splash } />
32
- < Route path = "/signin" render = { ( ) => ( < Signin cookies = { cookies } history = { history } /> ) } /> />
29
+ < Route path = "/signin" render = { ( props ) => ( < Signin { ... props } /> ) } />
33
30
< Route path = "/signup" component = { Signup } />
34
- < Route exact path = "/postings" render = { ( ) => ( < Postings cookies = { cookies } history = { history } /> ) } />
35
- < Route path = "/postings/apply/:postingId" render = { ( ) => ( < Apply cookies = { cookies } history = { history } /> ) } />
36
- < Route exact path = "/dashboard" render = { ( ) => ( < Dashboard cookies = { cookies } history = { history } /> ) } />
37
- < Route exact path = "/dashboard/post" render = { ( ) => ( < Post cookies = { cookies } history = { history } /> ) } />
38
- < Route path = "/dashboard/post/edit/:postingId" render = { ( ) => ( < Editpost cookies = { cookies } history = { history } /> ) } />
39
- < Route path = "/dashboard/applications/:postingId" render = { ( ) => ( < Applications cookies = { cookies } history = { history } /> ) } />
31
+ < Route exact path = "/postings" render = { ( props ) => ( < Postings { ... props } /> ) } />
32
+ < Route path = "/postings/apply/:postingId" render = { ( props ) => ( < Apply { ... props } /> ) } />
33
+ < Route exact path = "/dashboard" render = { ( props ) => ( < Dashboard { ... props } /> ) } />
34
+ < Route exact path = "/dashboard/post" render = { ( props ) => ( < Post { ... props } /> ) } />
35
+ < Route path = "/dashboard/post/edit/:postingId" render = { ( props ) => ( < Editpost { ... props } /> ) } />
36
+ < Route path = "/dashboard/applications/:postingId" render = { ( props ) => ( < Applications { ... props } /> ) } />
40
37
< Route path = "/404" component = { NotFound } />
41
38
< Redirect to = "/404" />
42
39
</ Switch >
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ class Apply extends Component {
16
16
17
17
componentDidMount ( ) {
18
18
let url = "http://localhost:8080/api/posting/" + this . props . match . params . postingId ;
19
+ console . log ( this . props ) ;
19
20
this . handleGet ( url ) ;
20
21
}
21
22
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ class Signin extends Component {
52
52
53
53
let authenticationPayload = {
54
54
username : username ,
55
- passwordHash : password ,
55
+ passwordHash : password
56
56
} ;
57
57
58
58
fetch ( cookieUrl , {
@@ -70,7 +70,7 @@ class Signin extends Component {
70
70
cookies . set ( "id" , cookies . id , { path : '/' } ) ;
71
71
cookies . set ( "isUser" , cookies . isUser , { path : '/' } ) ;
72
72
cookies . set ( "authenticationHash" , cookie . cookie , { path : '/' } ) ;
73
- console . log ( cookies ) ;
73
+
74
74
if ( cookies . isUser ) {
75
75
this . handleRedirect ( "/postings" )
76
76
}
You can’t perform that action at this time.
0 commit comments