mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-12 16:57:39 -05:00
cleaned up admin
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import React, { Component } from "react"
|
||||
import React from "react"
|
||||
import Navigation from "./Navigation"
|
||||
import { Routes, Route } from 'react-router-dom';
|
||||
|
||||
@@ -15,7 +15,6 @@ import ResetPassword from "../User/ResetPassword"
|
||||
import Terms from "../User/Terms"
|
||||
|
||||
const App = (params) => {
|
||||
const { store } = params;
|
||||
return (
|
||||
<div>
|
||||
<Navigation />
|
||||
|
||||
@@ -1,15 +1,10 @@
|
||||
import { Link } from "react-router-dom";
|
||||
import { Menu, Dropdown } from "semantic-ui-react";
|
||||
import React, { useEffect } from "react";
|
||||
import { useSelector, useDispatch } from 'react-redux'
|
||||
import { logoutUser } from "../features/user/userSlice";
|
||||
|
||||
const navStyle = {
|
||||
marginBottom: "30px"
|
||||
};
|
||||
const blankStyle = {
|
||||
marginBottom: "50px"
|
||||
};
|
||||
|
||||
const Navigation = (props) => {
|
||||
const dispatch = useDispatch();
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
import { connect } from "react-redux"
|
||||
import * as userActions from "../User/user-actions"
|
||||
import Navigation from "./Navigation"
|
||||
|
||||
|
||||
// Function passed in to `connect` to subscribe to Redux store updates.
|
||||
// Any time it updates, mapStateToProps is called.
|
||||
const mapStateToProps = (state) => {
|
||||
return {
|
||||
user: state.user
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Connects React component to the redux store
|
||||
// It does not modify the component class passed to it
|
||||
// Instead, it returns a new, connected component class, for you to use.
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
userActions
|
||||
)(Navigation)
|
||||
@@ -43,7 +43,7 @@ const Login = (props) => {
|
||||
if (result.success) {
|
||||
|
||||
if (nextLocation) {
|
||||
switch (this.props.nextLocation) {
|
||||
switch (nextLocation) {
|
||||
case "frontend":
|
||||
window.location = process.env.REACT_APP_FRONTEND_SERVER;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user