Skip to content

Commit

Permalink
Merge pull request #6619 from CitizenLabDotCo/master
Browse files Browse the repository at this point in the history
Release 11/12/2023:2
  • Loading branch information
EdwinKato authored Dec 11, 2023
2 parents cd8d5bb + 7b6b7bd commit f4cec9c
Show file tree
Hide file tree
Showing 7 changed files with 240 additions and 279 deletions.
19 changes: 19 additions & 0 deletions cl2-component-library/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions cl2-component-library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"@types/css-mediaquery": "^0.1.3",
"@types/jest": "^28.1.6",
"@types/lodash": "^4.14.200",
"@types/lodash-es": "^4.17.12",
"@types/react": "^17.0.2",
"@types/react-color": "3.0.10",
"@types/react-dom": "^17.0.13",
Expand Down
8 changes: 6 additions & 2 deletions front/app/containers/Admin/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,13 @@ const AdminPage = memo<Props & WithRouterProps>(
if (!userCanViewPath) {
return null;
}
const isProjectPage = pathname.match(
/admin\/projects\/[a-f0-9-]+(\/[\w-]+)*/
const isFoldersPage = pathname.match(
/admin\/projects\/folders\/[a-f0-9-]+(\/(?!projects(?:\/|$))[\w-]+)*/
);
const isProjectPage =
pathname.match(
/admin\/projects\/[a-f0-9-]+(\/(?!projects(?:\/|$))[\w-]+)*/
) && !isFoldersPage;

const noPadding =
pathname.includes('admin/dashboard') ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,7 @@ const ShortInputFieldValue = ({ customField, rawValue }: Props) => {
case 'number':
case 'checkbox':
case 'linear_scale': {
if (
rawValue === null ||
typeof rawValue === undefined ||
rawValue === ''
) {
if (rawValue === null || rawValue === undefined || rawValue === '') {
return <>No Answer</>;
} else {
return <>{rawValue}</>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,7 @@ const ShortUserFieldValue = ({ customField, rawValue }: Props) => {
case 'multiline_text':
case 'number':
case 'checkbox':
if (
rawValue === null ||
typeof rawValue === undefined ||
rawValue === ''
) {
if (rawValue === null || rawValue === undefined || rawValue === '') {
return <>{formatMessage(messages.noAnswer)}</>;
} else {
return <>{rawValue}</>;
Expand Down
Loading

0 comments on commit f4cec9c

Please sign in to comment.