Closed GeordieEK closed 4 months ago
LFGGGGGGGGGGG
interesting, some errors on /caucus
routes
UPDATE: the error is bubbling up from
// TODO: Bandaid - Another firebase type mismatch, it's expecting type Query but not entirely sure why
skew = useObjectVal<number>(firebase.database().ref('.info/serverTimeOffset') as any);
UPDATE: okay you'll need two patches. They're using the namespaced API because there's a type between what the library expects and what compat
exports:
First one in caucus.tsx
, replacing
// TODO: Improve this dirty fix
let skew: any
// TODO: Bandaid - Another firebase type mismatch, it's expecting type Query but not entirely sure why
skew = useObjectVal<number>(firebase.database().ref('/.info/serverTimeOffset') as any);
const startTimer = () => {
toggleTicking({
timerFref: props.fref.child('speakerTimer'),
timer: props.speakerTimer,
skew: skew.value
});
};
with
const db = getDatabase();
const [skew] = useObjectVal<number>(ref(db, '.info/serverTimeOffset'));
console.log("Got skew", skew, "millis");
const startTimer = () => {
toggleTicking({
timerFref: props.fref.child('speakerTimer'),
timer: props.speakerTimer,
skew
});
};
And the second one in strawpoll.tsx
export const getStrawpollRef = (committeeID: CommitteeID, strawpollID: StrawpollID) => {
const db = getDatabase();
return child(child(ref(db, 'committees'), committeeID), `strawpolls/${strawpollID}`)
};
Tragically this elicits a rework of Strawpoll.tsx
:
to use the child
constructors
Okay, so this is why the Netlify deploy is fucking up (as you said, Node version issues):
Going to hold off on bumping this in case it takes the site down entirely. Will pull the trigger right before merge.
Is a merge possible at this time? A test deployment with V20 may work. Perhaps a test env can be set up for that.
@Zhehan-Z apologies for the delay, merging
Second attempt at package upgrade, (see #193) now with less formatting!!