diff --git a/src/profile/components/Settings/Penalties/Mark.tsx b/src/profile/components/Settings/Penalties/Mark.tsx index 63b40d4b..df89b04e 100644 --- a/src/profile/components/Settings/Penalties/Mark.tsx +++ b/src/profile/components/Settings/Penalties/Mark.tsx @@ -17,13 +17,13 @@ const penaltyContent = (description: string, expiration: string, category: strin `; export interface IProps { - markUser: IMark; + mark: IMark; } -export const Mark = ({ markUser: { mark, expiration_date } }: IProps) => { - const expiration = DateTime.fromISO(expiration_date).toFormat('d MMMM y'); +export const Mark = ({ mark }: IProps) => { + const expiration = DateTime.fromISO(mark.expiration_date).toFormat('d MMMM y'); const added = DateTime.fromISO(mark.added_date); - const completion = getPenaltyCompletion(expiration_date); + const completion = getPenaltyCompletion(mark.expiration_date); const category = getMarkCategory(mark.category); const active = completion < 100; diff --git a/src/profile/components/Settings/Penalties/index.tsx b/src/profile/components/Settings/Penalties/index.tsx index 4c97b8ee..34b923ef 100644 --- a/src/profile/components/Settings/Penalties/index.tsx +++ b/src/profile/components/Settings/Penalties/index.tsx @@ -46,7 +46,7 @@ class Marks extends Component<{}, IState> { ifNone="Du har ingen prikker" loaded={loaded} penalties={marks} - render={(mark) => } + render={(mark) => } /> }; export interface IMark { - /** Max length of 155 characters */ expiration_date: IsoDateTime; - mark: { - title: string; - added_date: IsoDate; - given_by: null; // Requires changes in OW4 API. - last_changed_date: IsoDateTime; - last_changed_by: null; // Requires changes in OW4 API. - category: MarkCategory; - /** Max length of 255 characters */ - description: string; - }; + title: string; + added_date: IsoDate; + given_by: null; // Requires changes in OW4 API. + last_changed_date: IsoDateTime; + last_changed_by: null; // Requires changes in OW4 API. + category: MarkCategory; + /** Max length of 255 characters */ + description: string; } export interface ISuspension {