Skip to content

Commit 73b1551

Browse files
committed
refactor(web): feedback-addressing
1 parent c813e76 commit 73b1551

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

web/src/pages/Resolver/Policy/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ const Policy: React.FC = () => {
8686
<StyledFileUploader
8787
callback={handleFileUpload}
8888
variant={isDesktop ? "info" : undefined}
89-
msg={`You can attach additional information as a PDF file. Important: the above description must reference the relevant parts of the file content.\n${getFileUploaderMsg(Roles.Policy, roleRestrictions)}`}
89+
msg={`You can attach additional information here. Important: the above description must reference the relevant parts of the file content.\n${getFileUploaderMsg(Roles.Policy, roleRestrictions)}`}
9090
/>
9191

9292
<NavigationButtons prevRoute="/resolver/notable-persons" nextRoute="/resolver/preview" />

web/src/utils/index.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,14 @@ export const getFileUploaderMsg = (role: Roles, roleRestrictions?: Role[]) => {
2626
const restrictions = roleRestrictions.find((supportedRoles) => Roles[supportedRoles.name] === role);
2727

2828
if (!restrictions) return;
29-
30-
return `Allowed file types: [ ${restrictions.restriction.allowedMimeTypes
29+
const typesString = restrictions.restriction.allowedMimeTypes
3130
.map((type) => {
3231
const [prefix, suffix] = type.split("/");
3332
if (!suffix) return prefix ?? null;
3433

3534
return suffix === "*" ? prefix : suffix;
3635
})
37-
.join(", ")} ], Max allowed size: ${(restrictions.restriction.maxSize / (1024 * 1024)).toFixed(2)} MB.`;
36+
.join(", ");
37+
38+
return `Allowed file types: [${typesString}], Max allowed size: ${(restrictions.restriction.maxSize / (1024 * 1024)).toFixed(2)} MB.`;
3839
};

0 commit comments

Comments
 (0)