Commit 2d007e6b authored by David Haynes's avatar David Haynes 🙆
Browse files

Stateless components ftw

parent 4864dbff
Pipeline #3463 passed with stage
in 52 seconds
import React from "react";
import ReactDOM from "react-dom";
import { HashRouter, Route, Link } from "react-router-dom";
import { HashRouter } from "react-router-dom";
import { Routes } from "Utils";
......
import React from "react";
import { Navbar, NavbarBrand, Nav, NavItem, NavLink } from "reactstrap";
export default class NavBar extends React.Component {
render() {
return (
<div>
<Navbar color="dark" dark expand="md">
<NavbarBrand href="#">Go</NavbarBrand>
const NavBar = props => (
<div>
<Navbar color="dark" dark expand="md">
<NavbarBrand href="#">Go</NavbarBrand>
<Nav className="ml-auto" navbar>
<NavItem>
<NavLink href="#/dhaynes" active={this.props.page == "dhaynes"}>
Dhaynes
</NavLink>
</NavItem>
<NavItem>
<NavLink href="#/about" active={this.props.page == "about"}>
About
</NavLink>
</NavItem>
</Nav>
</Navbar>
</div>
);
}
}
<Nav className="ml-auto" navbar>
<NavItem>
<NavLink href="#/dhaynes" active={props.page == "dhaynes"}>
Dhaynes
</NavLink>
</NavItem>
<NavItem>
<NavLink href="#/about" active={props.page == "about"}>
About
</NavLink>
</NavItem>
</Nav>
</Navbar>
</div>
);
export default NavBar;
import React from "react";
import { Card, CardText, CardBody, CardTitle } from "reactstrap";
//Using Card class: reactstrap.github.io/components/card/
import { PageTemplate } from "Components";
// Apply Global Masonstrap styling
import "masonstrap/build/css/masonstrap.min.css";
import "masonstrap/build/js/masonstrap.min.js";
export default class AboutPage extends React.Component {
state = {};
componentDidMount() {
document.title = "About";
}
render() {
return (
<PageTemplate page={"about"}>
<p>About page</p>
<Card className="shadow-lg p-3 mb-5 bg-white rounded">
<CardBody>
<CardTitle>Terms of Use</CardTitle>
<CardText>
By using Go you acknowledge that you are a current George Mason
Student or faculty member.
const AboutPage = () => {
document.title = "About";
return (
<PageTemplate page={"about"}>
<p>About page</p>
<Card className="shadow-lg p-3 mb-5 bg-white rounded">
<CardBody>
<CardTitle>Terms of Use</CardTitle>
<CardText>
By using Go you acknowledge that you are a current George Mason
Student or faculty member.
<br />
Additionally, any link that you create is subject to removal by Go
admins if it is deemed to associate the univeristy with any
<br /> derogatory or controversial matters.
<br />
Go admins also reserve the right to remove and ban any users who
attempt to abuse the link creation system in any manner.
<br />
Since Go falls under the gmu.edu domain, users who use this service
will act in compliance with the GMU{" "}
<a href="https://universitypolicy.gmu.edu/policies/responsible-use-of-computing/">
Responsible Use of Computing
</a>{" "}
policies.
</CardText>
</CardBody>
</Card>
<Card className="shadow-lg p-3 mb-5 bg-white rounded">
<CardBody>
<CardTitle>Who made Go?</CardTitle>
<CardText>
<p>
Members of the
<a href="//srct.gmu.edu">
Student-Run Computing and Technology
</a>{" "}
registered student organization at{" "}
<a href="//gmu.edu">George Mason University</a> are the clever,
<br /> talented student developers behind Go.
</p>
<p>
We are a group of creative people that like making software and
want to give back to the Mason community at the same time.
</p>
<p />
<a href="//srct.gmu.edu/contact/">Contact us</a> to get involved!
<p />
</CardText>
</CardBody>
</Card>
<Card className="shadow-lg p-3 mb-5 bg-white rounded">
<CardBody>
<CardTitle>Thanks!</CardTitle>
<CardText>
<p>
This project was made possible through the collective
contributions of multiple Mason SRCT members.
<br />
Additionally, any link that you create is subject to removal by Go
admins if it is deemed to associate the univeristy with any
<br /> derogatory or controversial matters.
<a href="https://git.gmu.edu/srct/go/milestones/3">Go 2.2</a>:
<br />
Go admins also reserve the right to remove and ban any users who
attempt to abuse the link creation system in any manner.
<a href="https://github.com/dhaynespls">David Haynes</a>,
<a href="https://github.com/ocelotsloth">Mark Stenglein</a>,
<a href="https://www.youtube.com/watch?v=dQw4w9WgXcQ">
Andres Villogas
</a>
,<a href="https://github.com/IAmEyad">Eyad Hasan</a>,
<a href="https://github.com/zosman1">Zach Osman</a>,
<a href="">Leo Grandinetti</a>,
<a href="https://mason.gmu.edu/~gmoran/">Grady Moran</a>,
<a href="https://github.com/zmknox">Zach Knox</a>,
<a href="https://github.com/mike-bailey">Michael Bailey</a>,
<a href="https://github.com/jrouly">Michel Rouly</a>,
<a href="https://github.com/nanderson94">Nicholas Anderson</a>,
<a href="">Kevin Mckigney</a>, and{" "}
<a href="https://github.com/dwbond">Daniel Bond</a>.<br />
<a href="https://git.gmu.edu/srct/go/milestones/2">Go 2.1</a>:
<br />
Since Go falls under the gmu.edu domain, users who use this
service will act in compliance with the GMU{" "}
<a href="https://universitypolicy.gmu.edu/policies/responsible-use-of-computing/">
Responsible Use of Computing
</a>{" "}
policies.
</CardText>
</CardBody>
</Card>
<Card className="shadow-lg p-3 mb-5 bg-white rounded">
<CardBody>
<CardTitle>Who made Go?</CardTitle>
<CardText>
<p>
Members of the
<a href="//srct.gmu.edu">
Student-Run Computing and Technology
</a>{" "}
registered student organization at{" "}
<a href="//gmu.edu">George Mason University</a> are the clever,
<br /> talented student developers behind Go.
</p>
<p>
We are a group of creative people that like making software and
want to give back to the Mason community at the same time.
</p>
<p />
<a href="//srct.gmu.edu/contact/">Contact us</a> to get involved!
<p />
</CardText>
</CardBody>
</Card>
<Card className="shadow-lg p-3 mb-5 bg-white rounded">
<CardBody>
<CardTitle>Thanks!</CardTitle>
<CardText>
<p>
This project was made possible through the collective
contributions of multiple Mason SRCT members.
<br />
<a href="https://git.gmu.edu/srct/go/milestones/3">Go 2.2</a>:
<br />
<a href="https://github.com/dhaynespls">David Haynes</a>,
<a href="https://github.com/ocelotsloth">Mark Stenglein</a>,
<a href="https://www.youtube.com/watch?v=dQw4w9WgXcQ">
Andres Villogas
</a>
,<a href="https://github.com/IAmEyad">Eyad Hasan</a>,
<a href="https://github.com/zosman1">Zach Osman</a>,
<a href="">Leo Grandinetti</a>,
<a href="https://mason.gmu.edu/~gmoran/">Grady Moran</a>,
<a href="https://github.com/zmknox">Zach Knox</a>,
<a href="https://github.com/mike-bailey">Michael Bailey</a>,
<a href="https://github.com/jrouly">Michel Rouly</a>,
<a href="https://github.com/nanderson94">Nicholas Anderson</a>,
<a href="">Kevin Mckigney</a>, and{" "}
<a href="https://github.com/dwbond">Daniel Bond</a>.<br />
<a href="https://git.gmu.edu/srct/go/milestones/2">Go 2.1</a>:
<br />
<a href="https://github.com/dhaynespls">David Haynes</a>,
<a href="https://github.com/zosman1">Zach Osman</a>,
<a href="https://github.com/roberthitt">Robert Hitt</a>,
<a href="https://github.com/nanderson94">Nicholas Anderson</a>,
<a href="https://github.com/zmknox">Zach Knox</a>,
<a href="https://github.com/mike-bailey">Michael Bailey</a>,
<a href="https://github.com/mdsecurity">Mattias Duffy</a>,
<a href="https://github.com/IAmEyad">Eyad Hasan</a>, and{" "}
<a href="https://github.com/danielkim1">Danny Kim</a>.<br />
<a href="https://git.gmu.edu/srct/go/milestones/1">Go 2.0</a>:
<br />
<a href="https://github.com/dhaynespls">David Haynes</a>,
<a href="">Matthew Rodgers</a>,
<a href="https://github.com/nanderson94">Nicholas Anderson</a>,
and <a href="https://github.com/dwbond">Daniel Bond</a>.<br />
Go 1.0:
<br />
<a href="https://github.com/jrouly">Michel Rouly</a>,
<a href="https://github.com/creffett">Chris Reffett</a>,
<a href="https://github.com/nanderson94">Nicholas Anderson</a>,
and{" "}
<a href="https://github.com/akshaykarthik">Akshay Karthik</a>.
<br />
</p>
<p>
Additional thanks are due to the{" "}
<a href="https://wiki.srct.gmu.edu/Executive_Board">
Student-Run Computing and Technology executive board from
2014-present
</a>
, and our academic advisor,
<a href="https://cs.gmu.edu/~kdobolyi/">
Professor Kinga Dobolyi
</a>
.
</p>
</CardText>
</CardBody>
</Card>
</PageTemplate>
);
}
}
<a href="https://github.com/dhaynespls">David Haynes</a>,
<a href="https://github.com/zosman1">Zach Osman</a>,
<a href="https://github.com/roberthitt">Robert Hitt</a>,
<a href="https://github.com/nanderson94">Nicholas Anderson</a>,
<a href="https://github.com/zmknox">Zach Knox</a>,
<a href="https://github.com/mike-bailey">Michael Bailey</a>,
<a href="https://github.com/mdsecurity">Mattias Duffy</a>,
<a href="https://github.com/IAmEyad">Eyad Hasan</a>, and{" "}
<a href="https://github.com/danielkim1">Danny Kim</a>.<br />
<a href="https://git.gmu.edu/srct/go/milestones/1">Go 2.0</a>:
<br />
<a href="https://github.com/dhaynespls">David Haynes</a>,
<a href="">Matthew Rodgers</a>,
<a href="https://github.com/nanderson94">Nicholas Anderson</a>,
and <a href="https://github.com/dwbond">Daniel Bond</a>.<br />
Go 1.0:
<br />
<a href="https://github.com/jrouly">Michel Rouly</a>,
<a href="https://github.com/creffett">Chris Reffett</a>,
<a href="https://github.com/nanderson94">Nicholas Anderson</a>,
and <a href="https://github.com/akshaykarthik">Akshay Karthik</a>.
<br />
</p>
<p>
Additional thanks are due to the{" "}
<a href="https://wiki.srct.gmu.edu/Executive_Board">
Student-Run Computing and Technology executive board from
2014-present
</a>
, and our academic advisor,
<a href="https://cs.gmu.edu/~kdobolyi/">
Professor Kinga Dobolyi
</a>
.
</p>
</CardText>
</CardBody>
</Card>
</PageTemplate>
);
};
export default AboutPage;
import React from 'react';
import React from "react";
import { PageTemplate } from 'Components';
import { PageTemplate } from "Components";
export default class DhaynesPage extends React.Component {
render() {
return (
<PageTemplate page={'dhaynes'}>
<h2>DAVID HAYNES</h2>
</PageTemplate>
);
}
}
const DhaynesPage = () => (
<PageTemplate page={"dhaynes"}>
<h2>DAVID HAYNES</h2>
</PageTemplate>
);
export default DhaynesPage;
import React from 'react';
import React from "react";
import { PageTemplate, AuthButton } 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>
);
}
}
const HomePage = () => (
<PageTemplate page={"home"}>
<p>Hello World! 1</p>
<AuthButton />
</PageTemplate>
);
export default HomePage;
import HomePage from './HomePage';
import AboutPage from './AboutPage';
import DhaynesPage from './DhaynesPage';
import HomePage from "./HomePage";
import AboutPage from "./AboutPage";
import DhaynesPage from "./DhaynesPage";
export { HomePage, AboutPage, DhaynesPage };
import React from 'react';
import React from "react";
import { NavBar } from 'Components';
import { NavBar } from "Components";
export default class PageTemplate extends React.Component {
render() {
return (
<div>
<NavBar page={this.props.page} />
<div>{this.props.children}</div>
</div>
);
}
}
const PageTemplate = props => (
<div>
<NavBar page={props.page} />
<div>{props.children}</div>
</div>
);
export default PageTemplate;
import PageTemplate from './PageTemplate';
import PageTemplate from "./PageTemplate";
export { PageTemplate };
......@@ -4,7 +4,7 @@ import { NavBar } from "./Organisms";
import { AuthButton } from "./Molecules";
export {
//Tempaltes
//Templates
PageTemplate,
//Pages
HomePage,
......
import Routes from './Routes';
import Routes from "./Routes";
export { Routes };
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