mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-01 02:53:56 -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:
parent
bb16ae09ef
commit
6928a2bd98
15 changed files with 178 additions and 4 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue