@@ -86,7 +87,10 @@ const SignUpEmail = () => {
-
Get better data with conversational forms, surveys, quizzes & more.
+
+ Get better data with conversational forms, surveys, quizzes &
+ more.
+
@@ -117,11 +125,15 @@ const SignUpEmail = () => {
endAdornment: (
{show ? (
-
+
) : (
)}
@@ -132,19 +144,33 @@ const SignUpEmail = () => {
className="credential-field-inactive"
value={formik.values.password}
onChange={formik.handleChange}
- type={show ? "text": "password"}
+ type={show ? "text" : "password"}
name="password"
placeholder="Atleast 8 characters"
variant="outlined"
/>
- {(formik.touched.password && Boolean(formik.errors.password)) ? {formik.errors.password}
: <>>}
+ {formik.touched.password &&
+ Boolean(formik.errors.password) ? (
+
+ {formik.errors.password}
+
+ ) : (
+ <>>
+ )}
-
{/* Forgot Password? */}
-
+
@@ -152,7 +178,7 @@ const SignUpEmail = () => {
- )
+ );
};
export default SignUpEmail;
diff --git a/src/SignupPage/index.jsx b/src/SignupPage/index.jsx
index e26fb3e..b69a638 100644
--- a/src/SignupPage/index.jsx
+++ b/src/SignupPage/index.jsx
@@ -14,10 +14,10 @@ const SignupPage = () => {
try {
const { data, error } = await signInWithGoogle();
if (!error && data) {
- console.log("Google sign in success");
+ // show toast
}
} catch (error) {
- console.log("Error occured");
+ // show toast
}
};
diff --git a/src/_components/PrivateRoute/PrivateRoute.jsx b/src/_components/PrivateRoute/PrivateRoute.jsx
index 73ba036..e6908bd 100644
--- a/src/_components/PrivateRoute/PrivateRoute.jsx
+++ b/src/_components/PrivateRoute/PrivateRoute.jsx
@@ -4,30 +4,28 @@ import { useAuthContext } from "../../auth";
import { supabase } from "../../_supabase/supabaseInitialize";
export const PrivateRoute = () => {
- const { currentUser,setCurrentUser } = useAuthContext();
- const navigate=useNavigate()
+ const { currentUser, setCurrentUser } = useAuthContext();
+ const navigate = useNavigate();
let user;
async function readSession() {
- const {data: { session }}=await supabase.auth.getSession()
+ const {
+ data: { session },
+ } = await supabase.auth.getSession();
// setSession(session)
- user=session?.user
-
- if (user){
- console.log("Private route user here");
- setCurrentUser(user)
- }else{
- console.log("No user found");
- navigate("/login")
+ user = session?.user;
+
+ if (user) {
+ setCurrentUser(user);
+ } else {
+ navigate("/login");
}
}
useEffect(() => {
- if(!currentUser){
- readSession()
+ if (!currentUser) {
+ readSession();
}
- }, [currentUser])
-
- return (
-
- );
+ }, [currentUser]);
+
+ return
;
};
diff --git a/src/_services/CreateFormService.js b/src/_services/CreateFormService.js
index a0f9700..0894c3a 100644
--- a/src/_services/CreateFormService.js
+++ b/src/_services/CreateFormService.js
@@ -1,7 +1,6 @@
import { create } from "zustand";
import { supabase } from "../_supabase/supabaseInitialize";
-import { toast } from 'react-toastify';
-
+import { toast } from "react-toastify";
export const useCreateFormStore = create((set, get) => ({
loading: true,
@@ -34,15 +33,17 @@ export const useCreateFormStore = create((set, get) => ({
deleteForms: async (form_id) => {
set(() => ({ loading: true }));
try {
- console.log("We are callong")
- const {error,status} = await supabase.from("forms").delete().eq("id", form_id);
- if(error){
- if(status==0){
+ const { error, status } = await supabase
+ .from("forms")
+ .delete()
+ .eq("id", form_id);
+ if (error) {
+ if (status == 0) {
set(() => ({ error: "You’re offline", loading: false }));
- toast("You’re offline")
- }else{
+ toast("You’re offline");
+ } else {
set(() => ({ error: error.message, loading: false }));
- }
+ }
return;
}
let currentFetch = get().fetchFormsAgain;
diff --git a/src/_styles/editor.scss b/src/_styles/editor.scss
index d85c132..5df1ccb 100644
--- a/src/_styles/editor.scss
+++ b/src/_styles/editor.scss
@@ -289,6 +289,11 @@
cursor: pointer;
display: flex;
justify-content: space-between;
+ p {
+ white-space: wrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
.form-details-dropdown {
span {
transform: rotate(90deg);
diff --git a/src/_ui/ProfileDropdown/ProfileDropdown.jsx b/src/_ui/ProfileDropdown/ProfileDropdown.jsx
index 31f5725..f855efa 100644
--- a/src/_ui/ProfileDropdown/ProfileDropdown.jsx
+++ b/src/_ui/ProfileDropdown/ProfileDropdown.jsx
@@ -33,10 +33,9 @@ export default function ProfileDropdown({
await signOut();
setCurrentUser();
} catch (error) {
- console.log("There was an error");
+ // show toast
}
};
- console.log(userDetails);
return (
<>
diff --git a/src/auth/Authorize.jsx b/src/auth/Authorize.jsx
index 6e38d70..bffa806 100644
--- a/src/auth/Authorize.jsx
+++ b/src/auth/Authorize.jsx
@@ -51,8 +51,6 @@ const Authorize = ({ children }) => {
} = supabase.auth.onAuthStateChange((_event, session) => {
if (_event === "SIGNED_IN") {
if (currentUser === undefined) {
- console.log(_event);
-
setCurrentUser(session.user);
setSession(session);
}
@@ -68,7 +66,6 @@ const Authorize = ({ children }) => {
if (!session) {
console.log("No supabase user");
} else {
- console.log(session, "SESSION");
console.log("Supabase user exist");
}
const value = {