@@ -10,7 +10,14 @@ import {
|
|||||||
Clock,
|
Clock,
|
||||||
} from "react-bootstrap-icons";
|
} from "react-bootstrap-icons";
|
||||||
import { db } from "../../firebase.js";
|
import { db } from "../../firebase.js";
|
||||||
import { collection, onSnapshot, query, where } from "firebase/firestore";
|
import {
|
||||||
|
collection,
|
||||||
|
doc,
|
||||||
|
setDoc,
|
||||||
|
onSnapshot,
|
||||||
|
query,
|
||||||
|
where,
|
||||||
|
} from "firebase/firestore";
|
||||||
import { Typeahead } from "react-bootstrap-typeahead";
|
import { Typeahead } from "react-bootstrap-typeahead";
|
||||||
import { AppContext } from "../../Hooks/useContext/appContext.js";
|
import { AppContext } from "../../Hooks/useContext/appContext.js";
|
||||||
import UploadModal from "../Modals/UploadModal.js";
|
import UploadModal from "../Modals/UploadModal.js";
|
||||||
@@ -32,6 +39,7 @@ const Dashboard = () => {
|
|||||||
const { appState } = useContext(AppContext);
|
const { appState } = useContext(AppContext);
|
||||||
const { group } = appState;
|
const { group } = appState;
|
||||||
const appUserId = group ? group.appUserId : null;
|
const appUserId = group ? group.appUserId : null;
|
||||||
|
const _fbAuthUid = group ? group.fbAuthUid : null;
|
||||||
const isDashboard = true;
|
const isDashboard = true;
|
||||||
console.log("group on dashbaord page", group);
|
console.log("group on dashbaord page", group);
|
||||||
console.log("auth in dashoabrd page", auth);
|
console.log("auth in dashoabrd page", auth);
|
||||||
@@ -106,12 +114,13 @@ const Dashboard = () => {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleClick(e) {
|
async function handleClick(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
console.log("handle lcick");
|
|
||||||
//searchParams.set("mode", mode);
|
const updateRef = collection(db, "users");
|
||||||
//setSearchParams(searchParams);
|
await setDoc(doc(updateRef, _fbAuthUid), {
|
||||||
//navigate(`/passwordreset/?mode=enterEmail`);
|
isPromotionalFirstLogin: false,
|
||||||
|
});
|
||||||
navigate({
|
navigate({
|
||||||
pathname: "/passwordreset/",
|
pathname: "/passwordreset/",
|
||||||
search: `?${createSearchParams({
|
search: `?${createSearchParams({
|
||||||
|
|||||||
Reference in New Issue
Block a user