Skip to content

Commit

Permalink
Backend deployed
Browse files Browse the repository at this point in the history
  • Loading branch information
Pudi-Sravan committed Jul 4, 2024
1 parent 0c8f865 commit 8761b08
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Front_end/Authentication/loginpage/loginbox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function Login({ settoken, setUpdload }) {
let { data, error } = await supabase.auth.signInWithOAuth({
provider: provider,
options: {
redirectTo: import.meta.env.VITE_FRONTEND_URL + "/update-details", // Redirect to update-details after login
redirectTo: window.location.origin + "/update-details", // Redirect to update-details after login
},
});
if (data) {
Expand Down
2 changes: 1 addition & 1 deletion src/Front_end/Authentication/register/register.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function Register({ settoken }) {
let { data, error } = await supabase.auth.signInWithOAuth({
provider: provider,
options: {
redirectTo: import.meta.env.VITE_FRONTEND_URL + "/update-details", // Redirect to update-details after login
redirectTo: window.location.origin + "/update-details", // Redirect to update-details after login
},
});
if (data) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function Update(data, settoken) {
});
if (data) {
alert("update succesful");
navigate(import.meta.env.VITE_FRONTEND_URL)
window.location.reload()
navigate("/", { replace: true });
} else {
console.log(error);
Expand Down
3 changes: 1 addition & 2 deletions src/Front_end/homepage/homepage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ function Home(data) {
const [fetchdmupdate, setFetchdmupdate] = useState(false);
const [currentuserchannels, setCurrentuserchannels] = useState({});
const [dropdownOpen, setDropdownOpen] = useState(false);
const navigate=Navigate()
useEffect(() => {
const fetchData = async () => {
const specific_user = await Getuserdetails(data.data.user.id);
Expand Down Expand Up @@ -163,7 +162,7 @@ function Home(data) {
} else {
// localStorage.removeItem("token");
localStorage.removeItem("mailcheck");
navigate(import.meta.env.VITE_FRONTEND_URL)
window.location.reload()
}
} catch (error) {
console.log(error);
Expand Down

0 comments on commit 8761b08

Please sign in to comment.