mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Webatrice: update package.json (#4590)
* update package.json * cleanup Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
This commit is contained in:
parent
533045445a
commit
0d0337f091
17 changed files with 4618 additions and 10629 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import React from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import { Redirect } from 'react-router-dom';
|
||||
import { Navigate } from 'react-router-dom';
|
||||
|
||||
import { ServerSelectors } from 'store';
|
||||
import { RouteEnum } from 'types';
|
||||
|
|
@ -9,7 +9,7 @@ import { AuthenticationService } from 'api';
|
|||
|
||||
const AuthGuard = ({ state }: AuthGuardProps) => {
|
||||
return !AuthenticationService.isConnected(state)
|
||||
? <Redirect from="*" to={RouteEnum.LOGIN} />
|
||||
? <Navigate to={RouteEnum.LOGIN} />
|
||||
: <div></div>;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import React, { Component } from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import { Redirect } from 'react-router-dom';
|
||||
import { Navigate } from 'react-router-dom';
|
||||
|
||||
import { ServerSelectors } from 'store';
|
||||
import { User } from 'types';
|
||||
|
|
@ -11,7 +11,7 @@ import { RouteEnum } from 'types';
|
|||
class ModGuard extends Component<ModGuardProps> {
|
||||
render() {
|
||||
return !AuthenticationService.isModerator(this.props.user)
|
||||
? <Redirect from="*" to={RouteEnum.SERVER} />
|
||||
? <Navigate to={RouteEnum.SERVER} />
|
||||
: '';
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue