Skip to content

Commit

Permalink
fixed navbar to use non admin useSiteSetting
Browse files Browse the repository at this point in the history
  • Loading branch information
SilentFlameCR committed Dec 5, 2023
1 parent 94e0a60 commit 3f98502
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/javascript/components/home/NavbarSignedIn.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ import PropTypes from 'prop-types';
import { ChevronDownIcon } from '@heroicons/react/20/solid';
import useDeleteSession from '../../hooks/mutations/sessions/useDeleteSession';
import Avatar from '../users/user/Avatar';
import useSiteSettings from '../../hooks/queries/admin/site_settings/useSiteSettings';
import useSiteSetting from '../../hooks/queries/site_settings/useSiteSetting';

export default function NavbarSignedIn({ currentUser }) {
const { t } = useTranslation();
const deleteSession = useDeleteSession({ showToast: true });
const { data: siteSettings } = useSiteSettings(['HelpCenter']);
const { data: helpCenter } = useSiteSetting('HelpCenter');

// check if Help Center link is set in Site Settings and return link
const getHelpCenterLink = () => {
if (siteSettings?.HelpCenter) {
return siteSettings?.HelpCenter;
if (helpCenter) {
return helpCenter;
}
return 'https://docs.bigbluebutton.org/greenlight/v3/install';
};
Expand Down

0 comments on commit 3f98502

Please sign in to comment.