mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-30 23:50:19 -07:00
Webatrice: show loading screen until protobuf initializes (#4559)
* show loading screen until protobuf initializes * cleanup Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
This commit is contained in:
co-authored by
Jeremy Letto
parent
bb16ae09ef
commit
6928a2bd98
@@ -6,6 +6,7 @@ import { ServerState } from './server.interfaces'
|
||||
import { Types } from './server.types';
|
||||
|
||||
const initialState: ServerState = {
|
||||
initialized: false,
|
||||
buddyList: [],
|
||||
ignoreList: [],
|
||||
|
||||
@@ -33,6 +34,12 @@ const initialState: ServerState = {
|
||||
|
||||
export const serverReducer = (state = initialState, action: any) => {
|
||||
switch (action.type) {
|
||||
case Types.INITIALIZED: {
|
||||
return {
|
||||
...initialState,
|
||||
initialized: true
|
||||
}
|
||||
}
|
||||
case Types.CLEAR_STORE: {
|
||||
return {
|
||||
...initialState,
|
||||
|
||||
Reference in New Issue
Block a user