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

View File

@ -1,10 +1,15 @@
import './css/NavigationDrawer.css';
import React, { Component } from 'react';
import './css/NavigationDrawer.css';
import DisruptionButton from "./DisruptionButton.js";
class NavigationDrawer extends Component {
render() {
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 Departure from "../../classes/Departure.js";
import Disruption from "./Disruption.js";
class TrafficInfo extends Component {
render() {
@ -36,11 +35,6 @@ class TrafficInfo extends Component {
<MainArea>
<TrafficList departures={testStop.departures} />
</MainArea>
<Disruption>
<button onClick={Disruption} className="button">
Störning
</button>
</Disruption>
</>
);
}