Skip to content

Commit

Permalink
Modified the navigations
Browse files Browse the repository at this point in the history
  • Loading branch information
Pudi-Sravan committed Jul 4, 2024
1 parent e410110 commit 0c8f865
Show file tree
Hide file tree
Showing 5 changed files with 6 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: "https://slack-clone-3gvixgrvr-pudi-sravans-projects.vercel.app/" + "/update-details", // Redirect to update-details after login
redirectTo: import.meta.env.VITE_FRONTEND_URL + "/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: "https://slack-clone-3gvixgrvr-pudi-sravans-projects.vercel.app/" + "/update-details", // Redirect to update-details after login
redirectTo: import.meta.env.VITE_FRONTEND_URL + "/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");
window.location.reload();
navigate(import.meta.env.VITE_FRONTEND_URL)
navigate("/", { replace: true });
} else {
console.log(error);
Expand Down
5 changes: 3 additions & 2 deletions src/Front_end/homepage/homepage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import { SiGooglecalendar } from "react-icons/si";
import { RiArrowDropDownLine } from "react-icons/ri";
import { FaPlus } from "react-icons/fa";
import { GiHamburgerMenu } from "react-icons/gi";
import { Navigate } from "react-router-dom";

function Home(data) {
const {
Expand Down Expand Up @@ -78,7 +79,7 @@ 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 @@ -162,7 +163,7 @@ function Home(data) {
} else {
// localStorage.removeItem("token");
localStorage.removeItem("mailcheck");
window.location.reload();
navigate(import.meta.env.VITE_FRONTEND_URL)
}
} catch (error) {
console.log(error);
Expand Down
Binary file removed src/Front_end/images/pexels-padrinan-1111368.jpg
Binary file not shown.

0 comments on commit 0c8f865

Please sign in to comment.