Skip to content

Commit

Permalink
fix: ts error
Browse files Browse the repository at this point in the history
  • Loading branch information
linxin committed Sep 2, 2024
1 parent 36ea344 commit 6010ec5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions features/jobs/List.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { JobItem, CityItem } from '@/hooks/use-jobs'
import React from 'react'
// @ts-ignore
import get from 'lodash/get'
import { useTranslation } from 'next-i18next'
import { FullMask } from '@/components/popup'
Expand All @@ -16,7 +17,7 @@ const JobList: React.FC<JobProps> = props => {
const language = i18n.i18n?.language
const { jobs, cities } = props
const [visible, setVisible] = React.useState(false)
const [detailJob, setDetailJob] = React.useState()
const [detailJob, setDetailJob] = React.useState<JobItem>()

const getLocation = (_cities: string) => {
const city = _cities
Expand All @@ -31,7 +32,7 @@ const JobList: React.FC<JobProps> = props => {
return city.join(' ')
}

const handleJob = job => {
const handleJob = (job: JobItem) => {
setDetailJob(job)
setVisible(true)
}
Expand Down
1 change: 1 addition & 0 deletions hooks/use-jobs.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useEffect } from 'react'
import { useSafeState } from 'ahooks'
import { getAppConfig } from '@/services'
// @ts-ignore
import get from 'lodash/get'

/**
Expand Down

0 comments on commit 6010ec5

Please sign in to comment.