diff --git a/src/modules/datastores/components/FlintAlerts/index.js b/src/modules/datastores/components/FlintAlerts/index.js
index 5d52c17d..ba7b8b49 100644
--- a/src/modules/datastores/components/FlintAlerts/index.js
+++ b/src/modules/datastores/components/FlintAlerts/index.js
@@ -2,7 +2,7 @@ import { Alert, Anchor } from '../../../reusable';
import React, { useState } from 'react';
import PropTypes from 'prop-types';
-const FlintAlerts = ({ datastore, profile }) => {
+const FlintAlerts = ({ datastore, institutions = [] }) => {
const [dismiss, setDismiss] = useState([]);
const handleDismissClick = () => {
setDismiss((previousDismiss) => {
@@ -16,7 +16,7 @@ const FlintAlerts = ({ datastore, profile }) => {
website: (<>We noticed you are affiliated with U-M Flint. For the best results use the Thompson Library website.>)
};
- if (!Object.keys(messages).includes(datastore) || !profile.institutions?.includes('Flint') || dismiss.includes(datastore)) {
+ if (!Object.keys(messages).includes(datastore) || !institutions.includes('Flint') || dismiss.includes(datastore)) {
return null;
}
@@ -37,7 +37,7 @@ const FlintAlerts = ({ datastore, profile }) => {
FlintAlerts.propTypes = {
datastore: PropTypes.string,
- profile: PropTypes.object
+ institutions: PropTypes.array
};
export default FlintAlerts;
diff --git a/src/modules/pages/components/DatastorePage/index.js b/src/modules/pages/components/DatastorePage/index.js
index 786627f3..69336999 100644
--- a/src/modules/pages/components/DatastorePage/index.js
+++ b/src/modules/pages/components/DatastorePage/index.js
@@ -37,8 +37,8 @@ const DatastorePage = () => {
const institution = useSelector((state) => {
return state.institution;
});
- const profile = useSelector((state) => {
- return state.profile;
+ const { institutions } = useSelector((state) => {
+ return state.profile || {};
});
const search = useSelector((state) => {
return state.search;
@@ -94,7 +94,7 @@ const DatastorePage = () => {
<>
-
+
{
/>
}
+ element={
}
/>