Skip to content

Commit

Permalink
Safecoding certs (#723)
Browse files Browse the repository at this point in the history
* 🔧 Fix cert modal
  • Loading branch information
ZenikAdrien authored Oct 29, 2024
1 parent 37ce472 commit 9f428f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions hasura/metadata/tables.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,7 @@
- last_login
- name
- picture
- active
filter: {}
allow_aggregations: true
update_permissions:
Expand Down
9 changes: 4 additions & 5 deletions src/components/organisms/CertificationModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,10 @@ const CertificationModal = ({
const [hasExpiryDate, setHasExpiryDate] = useState<boolean>(
editMode && !!userCertificationRef.to
);
const sortedCerts = certificationsRef
? certificationsRef.sort((a, b) =>
a.certBody + a.name > b.certBody + b.name ? 1 : -1
)
: [];
let sortedCerts = certificationsRef.map((x) => x);
sortedCerts.sort((a, b) =>
a.certBody + a.name > b.certBody + b.name ? 1 : -1
);

return (
<div className="flex flex-col max-h-75vh p-2 w-full">
Expand Down

0 comments on commit 9f428f0

Please sign in to comment.