Skip to content

Commit

Permalink
Ya van los test de groupdetails
Browse files Browse the repository at this point in the history
  • Loading branch information
iyanfdezz committed Apr 16, 2024
1 parent 6bd4697 commit 7c225bb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion webapp/src/pages/Social/GroupDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import Nav from "../../components/Nav/Nav.js";
import Footer from "../../components/Footer/Footer.js";
import { useTranslation } from "react-i18next";
import Perfil from "../../components/Profile/Profile.js";
import { useNavigate } from "react-router-dom";


const GroupDetails = () => {
const { t } = useTranslation();
Expand All @@ -28,6 +30,8 @@ const GroupDetails = () => {
const { groupName } = useParams();
const apiEndpoint =
process.env.REACT_APP_API_ENDPOINT || "http://localhost:8000";

const navigate = useNavigate();

useEffect(() => {
fetchGroupDetails();
Expand All @@ -52,9 +56,10 @@ const GroupDetails = () => {
};

const redirectToProfile = (username) => {
setUser(username);
navigate(`/perfil?user=${username}`);
};


if(user){
return (
<>
Expand Down

0 comments on commit 7c225bb

Please sign in to comment.