const Main = () => {
const app = useFirebaseApp();
const auth = getAuth(app);
const state = useAuth(auth);
const db = getFirestore(app);
let todos = null;
createEffect(on(state, () => {
if (!state.loading && state.data !== null) {
todos = useFirestore(doc(db, "todos", state.data?.uid));
}
}));
const Main = () => {
const app = useFirebaseApp();
const auth = getAuth(app);
const state = useAuth(auth);
const db = getFirestore(app);
let todos = null;
createEffect(on(state, () => {
if (!state.loading && state.data !== null) {
todos = useFirestore(doc(db, "todos", state.data?.uid));
}
}));