cleaned up admin

This commit is contained in:
Luke Berndt
2023-04-05 21:16:53 -04:00
parent efe3794eee
commit f7f5265264
26 changed files with 149 additions and 304 deletions

View File

@@ -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 />

View File

@@ -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();

View File

@@ -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)

View File

@@ -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;