Skip to content

Commit

Permalink
fixed ts error & isHash
Browse files Browse the repository at this point in the history
  • Loading branch information
dudchakk committed Dec 4, 2024
1 parent dbdb112 commit a045f4a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const getInitialValues = (offer: Offer | null) => ({
subject: offer?.subject._id ?? '',
proficiencyLevel: offer?.proficiencyLevel ?? [],
languages: offer?.languages ?? [],
enrolledUsers: [],
title: offer?.title ?? '',
description: offer?.description ?? '',
price: offer?.price.toString() ?? '',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const CreateOrEditOffer: FC<CreateOrUpdateOfferProps> = ({
: OfferActionsEnum.Create

const onResponse = (response: Offer | null) => {
const isHash = hash === '#offer' ? true : undefined
const isHash = hash === '#offer'

dispatch(
openAlert(
Expand Down
2 changes: 1 addition & 1 deletion src/types/offer/interfaces/offer.interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export interface Offer extends CommonEntityFields {
proficiencyLevel: ProficiencyLevelEnum[]
description: string
languages: LanguagesEnum[]
enrolledUsers?: string[]
enrolledUsers: string[]
authorRole: UserRoleEnum.Tutor | UserRoleEnum.Student
author: Pick<
UserResponse,
Expand Down

0 comments on commit a045f4a

Please sign in to comment.