diff --git a/frontend/components/Viewing/Collection/Members.js b/frontend/components/Viewing/Collection/Members.js index a366a43a..5685177d 100644 --- a/frontend/components/Viewing/Collection/Members.js +++ b/frontend/components/Viewing/Collection/Members.js @@ -37,6 +37,7 @@ const sortOptions = [ export default function Members(properties) { const token = useSelector(state => state.user.token); + const privateGraph = useSelector(state => state.user.graphUri); const [search, setSearch] = useState(''); const [offset, setOffset] = useState(0); const [sort, setSort] = useState(sortMethods.displayId); @@ -74,9 +75,9 @@ export default function Members(properties) { offset: offset ? ` OFFSET ${offset}` : '', limit: ' LIMIT 10000 ' }; - + if (token) { - parameters.graphs = 'https://synbiohub.org/user/dfang97' + parameters.graphs = privateGraph } const searchQuery = preparedSearch || typeFilter !== 'Show Only Root Objects'; diff --git a/frontend/pages/root-collections.js b/frontend/pages/root-collections.js index 9665ac5c..f7ab7500 100644 --- a/frontend/pages/root-collections.js +++ b/frontend/pages/root-collections.js @@ -7,7 +7,7 @@ import ResultTable from '../components/Search/StandardSearch/ResultTable/ResultT import TopLevel from '../components/TopLevel'; import styles from '../styles/standardsearch.module.css'; import { addError } from '../redux/actions'; -import { useDispatch } from 'react-redux'; +import { useDispatch, useSelector } from 'react-redux'; const { publicRuntimeConfig } = getConfig(); /** @@ -62,6 +62,8 @@ export default function RootCollections({ data, error }) { // eslint-disable-next-line unicorn/prevent-abbreviations export async function getServerSideProps() { + // const token = useSelector(state => state.user.token); + // const token = context.store.getState().user.token; // Fetch rootCollections from sbh try { const url = `${publicRuntimeConfig.backendSS}/rootCollections`;