Skip to content

Commit

Permalink
Add: redirection to organization details page in the main Organizatio…
Browse files Browse the repository at this point in the history
…ns page
  • Loading branch information
georgipavlov-7DIGIT committed Sep 13, 2024
1 parent 63c349e commit 8f18318
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
14 changes: 10 additions & 4 deletions src/blocks/Organizations/Organizations.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import React, { useEffect, useMemo, useState } from "react";
import { useTranslation } from "react-i18next";
import { toast } from "react-toastify";
import { useQueryClient } from "@tanstack/react-query";
import { useNavigate } from "react-router-dom";

import {
Block,
Expand All @@ -9,11 +11,13 @@ import {
Modal,
Input,
} from "@USupport-components-library/src";
import { useGetOrganizationsWithDetails, useEditOrganization } from "#hooks";
import {
useGetOrganizationsWithDetails,
useEditOrganization,
useCreateOrganization,
} from "#hooks";

import "./organizations.scss";
import { useQueryClient } from "@tanstack/react-query";
import useCreateOrganization from "../../hooks/useCreateOrganization";

/**
* Organizations
Expand All @@ -25,6 +29,7 @@ import useCreateOrganization from "../../hooks/useCreateOrganization";
export const Organizations = () => {
const queryClient = useQueryClient();
const { t, i18n } = useTranslation("organizations");
const navigate = useNavigate();

const { data, isLoading } = useGetOrganizationsWithDetails();

Expand Down Expand Up @@ -63,7 +68,8 @@ export const Organizations = () => {
{
icon: "view",
text: t("view"),
handleClick: (id) => navigate(`/sponsor-details?sponsorId=${id}`),
handleClick: (id) =>
navigate(`/organization-details?organizationId=${id}`),
},
{
icon: "edit",
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Organizations/Organizations.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useTranslation } from "react-i18next";
import React from "react";
import { useTranslation } from "react-i18next";

import { Page, Organizations as OrganizationsBlock } from "#blocks";

Expand Down

0 comments on commit 8f18318

Please sign in to comment.