Corrected typos
This commit is contained in:
parent
6992906450
commit
63c85abeb4
@ -3,17 +3,17 @@ import React, { Component } from "react";
|
||||
import { User } from "./models/user";
|
||||
|
||||
export interface BuisnessProvided {
|
||||
states: BuisnessState;
|
||||
states: BusinessState;
|
||||
reducers: () => void;
|
||||
}
|
||||
|
||||
interface BuisnessState {
|
||||
interface BusinessState {
|
||||
user: User | null;
|
||||
}
|
||||
|
||||
interface Props {}
|
||||
|
||||
class BusinessLogicProvider extends Component<Props, BuisnessState> {
|
||||
class BusinessLogicProvider extends Component<Props, BusinessState> {
|
||||
constructor(props: Props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
@ -29,19 +29,16 @@ class BusinessLogicProvider extends Component<Props, BuisnessState> {
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
const ticket = urlParams.get("ticket");
|
||||
|
||||
if (!ticket && !this.state.user) {
|
||||
window.location.replace(
|
||||
`https://cas.amu.edu.pl/cas/login?service=${window.origin}&locale=pl`
|
||||
);
|
||||
} else if (ticket && !this.state.user) {
|
||||
if (!ticket) {
|
||||
window.location.replace(`https://cas.amu.edu.pl/cas/login?service=${window.origin}&locale=pl`);
|
||||
}
|
||||
if (ticket && !this.state.user) {
|
||||
this.setState({ user: { ticket } });
|
||||
}
|
||||
}
|
||||
|
||||
logout() {
|
||||
window.location.replace(
|
||||
`https://cas.amu.edu.pl/cas/logout?service=${window.origin}`
|
||||
);
|
||||
window.location.replace(`https://cas.amu.edu.pl/cas/logout?service=${window.origin}`);
|
||||
}
|
||||
|
||||
render() {
|
@ -1,8 +1,8 @@
|
||||
import React from "react";
|
||||
import "./index.scss";
|
||||
import Class, { Group } from "../Class";
|
||||
import BusinessLogicContext from "../../buisnesslogic/BusinessLogicContext";
|
||||
import { BuisnessProvided } from "../../buisnesslogic/BuisnessLogicProvider";
|
||||
import BusinessLogicContext from "../../businesslogic/BusinessLogicContext";
|
||||
import { BuisnessProvided } from "../../businesslogic/BusinessLogicProvider";
|
||||
|
||||
interface RightBarProps {
|
||||
onClassHover: (group_id: String, class_id: String) => void;
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Menu, MenuItem } from "@material-ui/core";
|
||||
import React, { FC } from "react";
|
||||
import BusinessLogicContext from "../../buisnesslogic/BusinessLogicContext";
|
||||
import { BuisnessProvided } from "../../buisnesslogic/BuisnessLogicProvider";
|
||||
import BusinessLogicContext from "../../businesslogic/BusinessLogicContext";
|
||||
import { BuisnessProvided } from "../../businesslogic/BusinessLogicProvider";
|
||||
|
||||
interface ProfileProps {
|
||||
anchorEl: HTMLElement | null;
|
||||
|
@ -1,7 +1,7 @@
|
||||
import React from "react";
|
||||
import ReactDOM from "react-dom";
|
||||
import App from "./App";
|
||||
import BuisnessLogicProvider from "./buisnesslogic/BuisnessLogicProvider";
|
||||
import BuisnessLogicProvider from "./businesslogic/BusinessLogicProvider";
|
||||
|
||||
ReactDOM.render(
|
||||
<React.Fragment>
|
||||
|
Loading…
Reference in New Issue
Block a user