Skip to content

Commit

Permalink
fixed issue with members where it was using hardcoded private graph
Browse files Browse the repository at this point in the history
  • Loading branch information
danielfang97 committed Sep 26, 2023
1 parent e4d0904 commit dd737d6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions frontend/components/Viewing/Collection/Members.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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';
Expand Down
4 changes: 3 additions & 1 deletion frontend/pages/root-collections.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();

/**
Expand Down Expand Up @@ -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`;
Expand Down

0 comments on commit dd737d6

Please sign in to comment.