const initialState = {
	profile: { data: null },
	name: { data: null },
	image: { data: null },
	barcode: { data: null }
}

function studentProfileReducer(state = initialState, action) {
	const newState = { ...state }
	switch (action.type) {
		case 'SET_STUDENT_PROFILE':
			newState.profile.data = action.profile
			return newState
		case 'SET_STUDENT_NAME':
			newState.name.data = action.name
			return newState
		case 'SET_STUDENT_PHOTO':
			newState.image.data = action.image
			return newState
		case 'SET_STUDENT_BARCODE':
			newState.barcode.data = action.barcode
			return newState
		case 'CLEAR_STUDENT_PROFILE_DATA':
			return initialState
		default:
			return state
	}
}

module.exports = studentProfileReducer

@@ -631,28 +631,132 @@
 %09return 
-initialState
+%7B%0A%09%09%09%09profile: %7B data: null %7D,%0A%09%09%09%09name: %7B data: null %7D,%0A%09%09%09%09image: %7B data: null %7D,%0A%09%09%09%09barcode: %7B data: null %7D%0A%09%09%09%7D
 %0A%09%09defau

Fix issue where data was not being cleared upon logout