[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] branch master updated: Setup auth reducer
From: |
gnunet |
Subject: |
[libeufin] branch master updated: Setup auth reducer |
Date: |
Tue, 02 Jun 2020 12:11:55 +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 1ca666a Setup auth reducer
1ca666a is described below
commit 1ca666a40422cb1cd7b03126ec2b13a76bc50bd6
Author: tanhengyeow <E0032242@u.nus.edu>
AuthorDate: Tue Jun 2 18:11:42 2020 +0800
Setup auth reducer
---
frontend/src/reducers/auth.tsx | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/frontend/src/reducers/auth.tsx b/frontend/src/reducers/auth.tsx
new file mode 100644
index 0000000..cf97e40
--- /dev/null
+++ b/frontend/src/reducers/auth.tsx
@@ -0,0 +1,22 @@
+import { Authenticate, Unauthenticate } from '../actions/auth';
+import { AUTHENTICATE, UNAUTHENTICATE } from '../constants';
+import { Auth } from '../types';
+
+export default function authReducer(
+ state: Auth = {
+ isAuthenticated: null,
+ },
+ action: Authenticate | Unauthenticate
+): Auth {
+ 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: Setup auth reducer,
gnunet <=