chore: run prettier

This commit is contained in:
Bjarne Oeverli 2021-11-02 08:47:42 +01:00
parent 789f714486
commit 3cc4ce61e7
No known key found for this signature in database
GPG Key ID: 38A98464B30B17FB
5 changed files with 16 additions and 11 deletions

View File

@ -13,7 +13,8 @@
"docker-build": "docker build -t hemmelig .",
"docker-run": "docker run -d --rm -e SECRET_HOST=localhost:3000 -e SECRET_REDIS_HOST=172.17.0.2 -p 3000:3000 --name=hemmelig-test hemmelig",
"production-test": "npm run docker-build && npm run docker-run",
"prepare": "husky install"
"prepare": "husky install",
"prettier": "prettier --write --ignore-unknown src/"
},
"repository": {
"type": "git",

View File

@ -1,3 +1,3 @@
export function userLoginChanged(payload) {
return { type: 'USER_LOGIN_CHANGED', payload }
}
return { type: 'USER_LOGIN_CHANGED', payload };
}

View File

@ -3,4 +3,4 @@ import rootReducer from '../reducers';
export default function configureStore() {
return createStore(rootReducer);
}
}

View File

@ -1,13 +1,12 @@
const initialState = {
isLoggedIn: false
}
isLoggedIn: false,
};
export default function rootReducer(state = initialState, action) {
switch (action.type) {
case 'USER_LOGIN_CHANGED':
return {...state, isLoggedIn: action.payload }
return { ...state, isLoggedIn: action.payload };
default:
return state
return state;
}
}
}

View File

@ -8,4 +8,9 @@ import './client/index.css';
const store = configureStore();
ReactDOM.render(<Provider store={store}><App /></Provider>, document.getElementById('root'));
ReactDOM.render(
<Provider store={store}>
<App />
</Provider>,
document.getElementById('root')
);