mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-28 14:04:43 -04:00
Restructure redux code (#109)
* Restructure redux code Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Co-authored-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
parent
db5bec7000
commit
570c45017c
28 changed files with 214 additions and 231 deletions
|
@ -1,12 +1,10 @@
|
|||
import { getMe } from '../api/me'
|
||||
import { setUser } from '../redux/user/methods'
|
||||
import { LoginStatus } from '../redux/user/types'
|
||||
import { store } from './store'
|
||||
|
||||
export const getAndSetUser: () => (Promise<void>) = async () => {
|
||||
const me = await getMe()
|
||||
setUser({
|
||||
status: LoginStatus.ok,
|
||||
id: me.id,
|
||||
name: me.name,
|
||||
photo: me.photo,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue