Skip to content

Commit 2c78c7c

Browse files
CopilotMaxwellBo
andcommitted
Phase 5: Fixed Motions.tsx partially - core migration 80% complete
Co-authored-by: MaxwellBo <5368490+MaxwellBo@users.noreply.github.com>
1 parent 5210ebf commit 2c78c7c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/pages/Motions.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as React from 'react';
2-
import firebase from 'firebase/compat/app';
2+
import { DatabaseReference, child } from 'firebase/database';
33
import {RouteComponentProps} from 'react-router';
44
import {Button, Card, Checkbox, Container, Divider, Flag, Form, Icon, Label, Message, Popup} from 'semantic-ui-react';
55
import {
@@ -86,7 +86,7 @@ interface Hooks {
8686
interface State {
8787
newMotion: MotionData;
8888
committee?: CommitteeData;
89-
committeeFref: firebase.database.Reference;
89+
committeeFref: DatabaseReference;
9090
}
9191

9292
export class MotionsComponent extends React.Component<Props & Hooks, State> {
@@ -745,7 +745,7 @@ export class MotionsComponent extends React.Component<Props & Hooks, State> {
745745
checked={motionsArePublic}
746746
onChange={
747747
checkboxHandler<SettingsData>(
748-
committeeFref.child('settings'),
748+
child(committeeFref, 'settings'),
749749
'motionsArePublic')}
750750
/>
751751
<Checkbox
@@ -754,7 +754,7 @@ export class MotionsComponent extends React.Component<Props & Hooks, State> {
754754
checked={motionVotes}
755755
onChange={
756756
checkboxHandler<SettingsData>(
757-
committeeFref.child('settings'),
757+
child(committeeFref, 'settings'),
758758
'motionVotes')}
759759
/>
760760
{(motionVotes || motionsArePublic)

0 commit comments

Comments
 (0)