Skip to content

Commit

Permalink
Fix company applications listing (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucieo authored Mar 1, 2024
1 parent 5b117d5 commit 3da9e79
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions web/components/Account/Info/InfoCompanyApplications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ interface Props {
const InfoCompanyApplications = ({ user }: Props) => {
const { t } = useTranslation('account')
const { currentCampaign } = useCampaignContext()

if (!currentCampaign) return null

return (
Expand Down
11 changes: 7 additions & 4 deletions web/utils/date.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ import DateFnsFormat from 'date-fns/format'
export const format = (
date: string | Date,
formatDate: string = 'dd/MM/yyyy',
) =>
DateFnsFormat(new Date(date), formatDate, {
locale: fr,
})
) => {
if (date) {
return DateFnsFormat(new Date(date), formatDate, {
locale: fr,
})
}
}

export const orderByDate = (array: Record<string, any>[], key: string) => {
if (!array) return []
Expand Down

0 comments on commit 3da9e79

Please sign in to comment.