add option for "bruh" and formatted document
This commit is contained in:
parent
c9a0822f3b
commit
d7e51ff304
|
@ -32,6 +32,7 @@
|
|||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
|
|
25
src/App.js
25
src/App.js
|
@ -19,7 +19,7 @@ import './App.css'
|
|||
|
||||
if (!getApps().length) {
|
||||
initializeApp(firebaseConfig);
|
||||
}
|
||||
}
|
||||
|
||||
// declare variables
|
||||
|
||||
|
@ -40,12 +40,12 @@ export function MyForm(props) {
|
|||
}, []);
|
||||
|
||||
// Ensure Firebase is initialized before using it
|
||||
if (!getApp().length) {
|
||||
if (!getApp().length) {
|
||||
initializeApp(firebaseConfig);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
const db = getFirestore(getApp());
|
||||
const db = getFirestore(getApp());
|
||||
|
||||
|
||||
// Create a function to handle the checkbox changes and update the state accordingly.
|
||||
|
@ -134,7 +134,7 @@ const db = getFirestore(getApp());
|
|||
onChange={handleCheckboxChange}
|
||||
/>
|
||||
|
||||
<Form.Check
|
||||
<Form.Check
|
||||
type="checkbox"
|
||||
label="sus"
|
||||
value="sus"
|
||||
|
@ -142,7 +142,7 @@ const db = getFirestore(getApp());
|
|||
onChange={handleCheckboxChange}
|
||||
/>
|
||||
|
||||
<Form.Check
|
||||
<Form.Check
|
||||
type="checkbox"
|
||||
label="fr fr"
|
||||
value="fr fr"
|
||||
|
@ -150,19 +150,24 @@ const db = getFirestore(getApp());
|
|||
onChange={handleCheckboxChange}
|
||||
/>
|
||||
|
||||
<Form.Check
|
||||
<Form.Check
|
||||
type="checkbox"
|
||||
label="balls"
|
||||
value="balls"
|
||||
checked={selectedOptions.includes('balls')}
|
||||
onChange={handleCheckboxChange}
|
||||
/>
|
||||
|
||||
<Form.Check
|
||||
type="checkbox"
|
||||
label="bruh"
|
||||
value="bruh"
|
||||
checked={selectedOptions.includes('bruh')}
|
||||
onChange={handleCheckboxChange} />
|
||||
|
||||
<Button type="submit">Submit</Button>
|
||||
</Col>
|
||||
</Form.Group>
|
||||
<p>Refresh once submitted to see result added below.</p>
|
||||
<p>Refresh once submitted to see result added below.</p>
|
||||
|
||||
<Form.Group>
|
||||
<h2>Existing incidents in the database:</h2>
|
||||
|
@ -183,7 +188,7 @@ const db = getFirestore(getApp());
|
|||
</Form.Group>
|
||||
</Form>
|
||||
</div>
|
||||
// Create a form group to display the existing entries in the database.
|
||||
// Create a form group to display the existing entries in the database.
|
||||
);
|
||||
}
|
||||
export default MyForm;
|
||||
|
|
Loading…
Reference in New Issue