Skip to content

Commit

Permalink
use selected namespace in identity query
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Shorsher <[email protected]>
  • Loading branch information
shorsher committed Sep 15, 2022
1 parent 2ed4bb3 commit 406253c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/Slides/IdentitySlide.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import { Grid } from '@mui/material';
import React, { useContext, useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { ApplicationContext } from '../../contexts/ApplicationContext';
import { SnackbarContext } from '../../contexts/SnackbarContext';
import { FF_Paths, IIdentity } from '../../interfaces';
import { DEFAULT_PADDING } from '../../theme';
Expand All @@ -37,6 +38,7 @@ export const IdentitySlide: React.FC<Props> = ({ did, open, onClose }) => {
const { reportFetchError } = useContext(SnackbarContext);
const { t } = useTranslation();
const [identity, setIdentity] = useState<IIdentity>();
const { selectedNamespace } = useContext(ApplicationContext);

const [isMounted, setIsMounted] = useState(false);
useEffect(() => {
Expand All @@ -49,7 +51,9 @@ export const IdentitySlide: React.FC<Props> = ({ did, open, onClose }) => {
useEffect(() => {
isMounted &&
fetchCatcher(
`${FF_Paths.apiPrefix}${FF_Paths.networkIdentitiesByDID(
`${
FF_Paths.nsPrefix
}/${selectedNamespace}/${FF_Paths.networkIdentitiesByDID(
did
)}?fetchverifiers`
)
Expand Down

0 comments on commit 406253c

Please sign in to comment.