Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Greenlight version number only appears for admins #5893

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion app/javascript/components/shared_components/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,20 @@ import { useTranslation } from 'react-i18next';
import { Container } from 'react-bootstrap';
import useEnv from '../../hooks/queries/env/useEnv';
import useSiteSetting from '../../hooks/queries/site_settings/useSiteSetting';
import { useAuth } from '../../contexts/auth/AuthProvider';

export default function Footer() {
const { t } = useTranslation();
const { data: env } = useEnv();
const { data: links } = useSiteSetting(['Terms', 'PrivacyPolicy']);
const currentUser = useAuth();
const isAdmin = currentUser && currentUser.role && currentUser?.role.name === 'Administrator';

return (
<footer id="footer" className="footer background-whitesmoke text-center">
<Container id="footer-container" className="py-3">
<a href="https://docs.bigbluebutton.org/greenlight/v3/install" target="_blank" rel="noreferrer">Greenlight</a>
<span className="text-muted"> {env?.VERSION_TAG} </span>
{ isAdmin && <span className="text-muted"> {env?.VERSION_TAG} </span> }
{ links?.Terms
&& (
<a className="ps-3" href={links?.Terms} target="_blank" rel="noreferrer">
Expand Down
Loading