[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] branch master updated: Update reducers folder
From: |
gnunet |
Subject: |
[libeufin] branch master updated: Update reducers folder |
Date: |
Wed, 10 Jun 2020 20:36:52 +0200 |
This is an automated email from the git hooks/post-receive script.
heng-yeow pushed a commit to branch master
in repository libeufin.
The following commit(s) were added to refs/heads/master by this push:
new 7906ded Update reducers folder
7906ded is described below
commit 7906ded0616aac733ab0795aa6e29e1fdf3279c2
Author: tanhengyeow <E0032242@u.nus.edu>
AuthorDate: Thu Jun 11 02:36:44 2020 +0800
Update reducers folder
---
frontend/src/reducers/index.tsx | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/frontend/src/reducers/index.tsx b/frontend/src/reducers/index.tsx
new file mode 100644
index 0000000..76e2d0c
--- /dev/null
+++ b/frontend/src/reducers/index.tsx
@@ -0,0 +1,22 @@
+import { Authenticate, Unauthenticate } from '../actions/auth';
+import { AUTHENTICATE, UNAUTHENTICATE } from '../constants';
+import { Store } from '../types';
+
+export default function rootReducer(
+ state: Store = {
+ isAuthenticated: false,
+ },
+ action: Authenticate | Unauthenticate
+): Store {
+ switch (action.type) {
+ case AUTHENTICATE:
+ return {
+ ...state,
+ isAuthenticated: true,
+ };
+ case UNAUTHENTICATE:
+ return { ...state, isAuthenticated: false };
+ default:
+ return state;
+ }
+}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libeufin] branch master updated: Update reducers folder,
gnunet <=