Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 3 additions & 1 deletion src/components/Hearing/Comment/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ const Comment = (props) => {
}
};

const isCommentByAdmin = () => data.organization;

const onCopyURL = () => {
// Build absolute URL for comment
const commentUrl = `${window.location.origin}${window.location.pathname}#comment-${props.data.id}`;
Expand Down Expand Up @@ -542,7 +544,7 @@ const Comment = (props) => {
'hearing-comment__has-replys':
data.subComments && Array.isArray(data.subComments) && data.subComments.length > 0,
'comment-animate': state.shouldAnimate,
'hearing-comment__admin': adminUser,
'hearing-comment__admin': isCommentByAdmin(),
'hearing-comment__flagged': canFlagComments() && data.flagged,
'hearing-comment__is-pinned': props.data.pinned,
},
Expand Down
5 changes: 3 additions & 2 deletions src/components/admin/SectionForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { sectionShape } from '../../types';
import { isSpecialSectionType } from '../../utils/section';
import compressFile from '../../utils/images/compressFile';
import fileToDataUri from '../../utils/images/fileToDataUri';
import config from '../../config';

const getFileTitle = (title, language) => {
if (title?.[language] && typeof title[language] !== 'undefined') {
Expand Down Expand Up @@ -225,9 +226,9 @@ const SectionForm = ({
const commentingOptions = [
{ value: 'open', label: formatMessage({ id: 'openCommenting' }) },
{ value: 'registered', label: formatMessage({ id: 'registeredUsersOnly' }) },
{ value: 'strong', label: formatMessage({ id: 'registeredStrongOnly' }) },
...config.enableStrongAuth ? [{ value: 'strong', label: formatMessage({ id: 'registeredStrongOnly' }) }] : [],
{ value: 'none', label: formatMessage({ id: 'noCommenting' }) },
];
];

const commentingInitialValue = section.commenting
? commentingOptions.find((option) => option.value === section.commenting)
Expand Down
7 changes: 2 additions & 5 deletions src/routes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,8 @@ const UserProfile = lazy(() => import(
*/
const Redirector = () => {
const { hearingSlug } = useParams();
return (
<div>
<Navigate to={`/${hearingSlug}`} />
</div>
)};
return (<Navigate to={`/${hearingSlug}`} />);
};

const AppRoutes = () => (
<Suspense fallback={<LoadSpinner />}>
Expand Down
Loading