BesucherAnzahl und BarSpende === gleiche Componente
Abh. von isBar Anzeige der Barspende
This commit is contained in:
11
src/App.jsx
11
src/App.jsx
@@ -1,6 +1,6 @@
|
||||
import './App.css'
|
||||
import FandStatt from './components/FandStatt.jsx'
|
||||
import BesucherAnzahl from './components/BesucherAnzahl.jsx'
|
||||
import BesucherBar from './components/BesucherBar.jsx'
|
||||
import Spende from './components/Spende.jsx'
|
||||
import LastLine from './components/LastLine.jsx'
|
||||
import Bemerkungen from './components/Bemerkungen.jsx'
|
||||
@@ -12,8 +12,12 @@ function App() {
|
||||
const name = "Meiehofer"
|
||||
const version = "1.0.0"
|
||||
const vdate = "2025-11-23"
|
||||
const isBar = true;
|
||||
|
||||
console.log("Render")
|
||||
let withBar = null
|
||||
if (isBar) {
|
||||
withBar = <BesucherBar title="Höhe der Barspende" euro="€" />
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -26,8 +30,9 @@ function App() {
|
||||
<h3 className="nachbearbeitung">Nachbearbeitung</h3>
|
||||
</div>
|
||||
<FandStatt />
|
||||
<BesucherAnzahl />
|
||||
<BesucherBar title="Besucher-Anzahl" euro="" />
|
||||
<Spende />
|
||||
{withBar}
|
||||
<Bemerkungen />
|
||||
<LastButtons />
|
||||
<LastLine version={version} vdate={vdate} />
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
export default function BesucherAnzahl() {
|
||||
export default function BesucherBar({title, euro}) {
|
||||
|
||||
return(
|
||||
|
||||
<section id="besucheranzahl">
|
||||
<h3>Besucher-Anzahl:</h3>
|
||||
<section id="besucherbar">
|
||||
<h3>{title}:</h3>
|
||||
<div className="besadiv">
|
||||
<input className="infeld" />
|
||||
{euro}
|
||||
<button className="okbutton">OK</button>
|
||||
</div>
|
||||
</section>
|
||||
Reference in New Issue
Block a user