Commit a6bc3252 authored by Zach Osman's avatar Zach Osman

Cleanup

parent 27209ea8
Pipeline #3256 passed with stage
in 54 seconds
import React from 'react';
import ReactDOM from 'react-dom';
import { HashRouter, Route, Link } from 'react-router-dom';
// Apply Global Masonstrap styling
import "masonstrap/build/css/masonstrap.min.css";
import "masonstrap/build/js/masonstrap.min.js";
import { Routes } from 'Utils';
// const App = () => (
// <PageTemplate>
// <Routes />
// </PageTemplate>
// );
// Apply Global Masonstrap styling
import 'masonstrap/build/css/masonstrap.min.css';
import 'masonstrap/build/js/masonstrap.min.js';
ReactDOM.render(
<HashRouter>
......
import React from "react";
import { Button } from "reactstrap";
class AuthButton extends React.Component {
constructor(props) {
super(props);
this.state = { is_auth: false };
}
componentDidMount() {
this.setState(() => {
return { is_auth: window.django.user.is_authenticated == "True" };
});
}
render() {
return (
<div>
{this.state.is_auth ? (
<Button color="info" href="/auth/logout">
Logout
</Button>
) : (
<Button color="info" href="/auth/login">
Login
</Button>
)}
</div>
);
}
}
export default AuthButton;
import React from 'react';
import { Button } from 'reactstrap';
export default class AuthButton extends React.Component {
constructor(props) {
super(props);
this.state = { is_auth: false };
}
componentDidMount() {
this.setState(() => {
return { is_auth: window.django.user.is_authenticated == 'True' };
});
}
render() {
return (
<div>
{this.state.is_auth ? (
<Button color="info" href="/auth/logout">
Logout
</Button>
) : (
<Button color="info" href="/auth/login">
Login
</Button>
)}
</div>
);
}
}
import AuthButton from './AuthButton';
export { AuthButton };
import React from 'react';
import { PageTemplate } from 'Components';
import { PageTemplate, AuthButton } from 'Components';
export default class HomePage extends React.Component {
render() {
return (
<PageTemplate page={'home'}>
<p>Hello World! 1</p>
<AuthButton />
</PageTemplate>
);
}
......
import { PageTemplate } from './Templates';
import { HomePage, AboutPage, DhaynesPage } from './Pages';
import { NavBar } from './Organisms';
import { AuthButton } from './Molecules';
export {
//Tempaltes
......@@ -11,4 +12,6 @@ export {
DhaynesPage,
//Organisms
NavBar,
//Molecules
AuthButton,
};
// Apply Global Masonstrap styling
import "masonstrap/build/css/masonstrap.min.css";
import "masonstrap/build/js/masonstrap.min.js";
import React from "react";
import ReactDOM from "react-dom";
import AuthButton from "./AuthButton.jsx";
ReactDOM.render(
<div>
<AuthButton />
</div>,
document.getElementById("root")
);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment