File tree Expand file tree Collapse file tree 7 files changed +50
-12
lines changed Expand file tree Collapse file tree 7 files changed +50
-12
lines changed Original file line number Diff line number Diff line change @@ -35,9 +35,7 @@ const App = ({
35
35
< div >
36
36
< GlobalStyles theme = { theme } />
37
37
< Router >
38
- { /*
39
- Please update the code as your project requirements
40
- */ }
38
+ { /* Please update the code below for your project requirements */ }
41
39
< div >
42
40
< ul >
43
41
< li >
@@ -50,7 +48,7 @@ const App = ({
50
48
< Link to = "/topics" > Topics</ Link >
51
49
</ li >
52
50
< li >
53
- < Link to = "/404 " > 404</ Link >
51
+ < Link to = "/link-does-not-exist " > 404</ Link >
54
52
</ li >
55
53
</ ul >
56
54
@@ -80,6 +78,11 @@ const App = ({
80
78
) )
81
79
}
82
80
</ ul >
81
+
82
+ < hr />
83
+
84
+ < h3 > Images from simply from: < code > ~./assets/[image]</ code > </ h3 >
85
+ < img src = "/assets/social-sprite.png" alt = "social icon sprites" />
83
86
</ div >
84
87
</ Router >
85
88
</ div >
Original file line number Diff line number Diff line change 4
4
< meta charset ="UTF-8 ">
5
5
< meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
6
6
< meta http-equiv ="X-UA-Compatible " content ="ie=edge ">
7
- < title > fluidEx </ title >
7
+ < title > React base code </ title >
8
8
< style data-styled-components ="true "> </ style >
9
9
< link href ="https://fonts.googleapis.com/css?family=Open+Sans|Roboto+Mono|Slabo+27px " rel ="stylesheet ">
10
10
</ head >
Original file line number Diff line number Diff line change
1
+ import themes from '../data/session' ;
2
+
3
+ describe ( 'session reducer' , ( ) => {
4
+ it ( 'should return the initial state' , ( ) => {
5
+ expect ( themes ( undefined , { } ) ) . toEqual ( { } ) ;
6
+ } ) ;
7
+
8
+ it ( 'should return user session' , ( ) => {
9
+ expect ( themes ( { } , {
10
+ type : 'FILL' ,
11
+ } ) ) . toEqual ( {
12
+ uid : 10001 ,
13
+ name : 'user' ,
14
+ } ) ;
15
+ } ) ;
16
+ } ) ;
Original file line number Diff line number Diff line change
1
+ import themes , { initalState } from '../data/themes' ;
2
+
3
+ describe ( 'theme reducer' , ( ) => {
4
+ it ( 'should return the initial state' , ( ) => {
5
+ expect ( themes ( undefined , { } ) ) . toBe ( initalState ) ;
6
+ } ) ;
7
+
8
+ it ( 'should return with white theme selected' , ( ) => {
9
+ expect ( themes ( initalState , {
10
+ type : 'CHANGE_THEME' ,
11
+ id : 'white_theme' ,
12
+ } ) . selected . id ) . toBe ( 'white_theme' ) ;
13
+ } ) ;
14
+
15
+ it ( 'should return with black theme selected' , ( ) => {
16
+ expect ( themes ( initalState , {
17
+ type : 'CHANGE_THEME' ,
18
+ id : 'dark_theme' ,
19
+ } ) . selected . id ) . toBe ( 'dark_theme' ) ;
20
+ } ) ;
21
+ } ) ;
Original file line number Diff line number Diff line change 1
- const session = {
2
- uid : 10001 ,
3
- name : 'user' ,
4
- } ;
5
-
6
1
export default ( state = { } , action ) => {
7
2
switch ( action . type ) {
8
3
case 'FILL' :
9
- return { ...session } ;
4
+ return {
5
+ uid : 10001 ,
6
+ name : 'user' ,
7
+ } ;
10
8
11
9
default :
12
10
return state ;
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ const data = [{
6
6
name : 'Dark' ,
7
7
} ] ;
8
8
const selected = data [ 0 ] ;
9
- const initalState = {
9
+ export const initalState = {
10
10
data,
11
11
selected,
12
12
} ;
You can’t perform that action at this time.
0 commit comments