feat(Relays): added logic to manage relays

This commit is contained in:
Yury 2024-05-20 16:21:43 +03:00
parent c03ac19f74
commit 4268916152
4 changed files with 11 additions and 5 deletions

View File

@ -15,8 +15,8 @@ store.subscribe(
saveState({
auth: store.getState().auth,
metadata: store.getState().metadata,
relays: store.getState().relays,
userRobotImage: store.getState().userRobotImage
userRobotImage: store.getState().userRobotImage,
relays: store.getState().relays
})
}, 1000)
)

View File

@ -11,9 +11,9 @@ import { VerifyPage } from '../pages/verify'
export const appPrivateRoutes = {
homePage: '/',
create: '/create',
sign: '/sign',
verify: '/verify',
relays: '/relays',
sign: '/sign'
relays: '/relays'
}
export const appPublicRoutes = {
@ -63,5 +63,9 @@ export const privateRoutes = [
{
path: appPrivateRoutes.verify,
element: <VerifyPage />
},
{
path: appPrivateRoutes.relays,
element: <RelaysPage />
}
]

View File

@ -11,3 +11,5 @@ export const SET_METADATA_EVENT = 'SET_METADATA_EVENT'
export const SET_RELAY_MAP = 'SET_RELAY_MAP'
export const SET_USER_ROBOT_IMAGE = 'SET_USER_ROBOT_IMAGE'
export const SET_RELAY_MAP = 'SET_RELAY_MAP'

View File

@ -3,9 +3,9 @@ import { combineReducers } from 'redux'
import authReducer from './auth/reducer'
import { AuthState } from './auth/types'
import metadataReducer from './metadata/reducer'
import userRobotImageReducer from './userRobotImage/reducer'
import { RelaysState } from './relays/types'
import relaysReducer from './relays/reducer'
import userRobotImageReducer from './userRobotImage/reducer'
export interface State {
auth: AuthState