Move and rename Disruption

This commit is contained in:
André Wahlberg 2020-11-27 13:58:35 +01:00
parent 1067277cb8
commit a1158d4525
3 changed files with 12 additions and 15 deletions

View File

@ -1,7 +1,7 @@
import addNotification from "react-push-notification"; import addNotification from "react-push-notification";
const Disruption = () => { const DisruptionButton = () => {
const buttonClick = () => { const genDisrupt = () => {
addNotification({ addNotification({
title: "Warning", title: "Warning",
subtitle: "This is a subtitle", subtitle: "This is a subtitle",
@ -12,12 +12,10 @@ const Disruption = () => {
}; };
return ( return (
<div className="page"> <button onClick={genDisrupt} id="disruptBtn">
<button onClick={buttonClick} className="button"> Generera Störning
Störning
</button> </button>
</div>
); );
}; };
export default Disruption; export default DisruptionButton;

View File

@ -1,10 +1,15 @@
import './css/NavigationDrawer.css';
import React, { Component } from 'react'; import React, { Component } from 'react';
import './css/NavigationDrawer.css';
import DisruptionButton from "./DisruptionButton.js";
class NavigationDrawer extends Component { class NavigationDrawer extends Component {
render() { render() {
return ( return (
<div id="navDrawer"></div> <div id="navDrawer">
<DisruptionButton />
</div>
); );
} }
} }

View File

@ -9,7 +9,6 @@ import TrafficList from "../TrafficList.js";
import Stop from "../../classes/Stop.js"; import Stop from "../../classes/Stop.js";
import Departure from "../../classes/Departure.js"; import Departure from "../../classes/Departure.js";
import Disruption from "./Disruption.js";
class TrafficInfo extends Component { class TrafficInfo extends Component {
render() { render() {
@ -36,11 +35,6 @@ class TrafficInfo extends Component {
<MainArea> <MainArea>
<TrafficList departures={testStop.departures} /> <TrafficList departures={testStop.departures} />
</MainArea> </MainArea>
<Disruption>
<button onClick={Disruption} className="button">
Störning
</button>
</Disruption>
</> </>
); );
} }