-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #569 from BinaryStudioAcademy/task/bt-541-replace-…
…candidate-screen-with-real-data-and-connect-filters bt-541: replace candidate screen with real data and connect filters
- Loading branch information
Showing
77 changed files
with
31,401 additions
and
464 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { useCommonData } from './use-common-data/use-common-data'; |
30 changes: 30 additions & 0 deletions
30
mobile/src/bundles/common-data/hooks/use-common-data/use-common-data.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { | ||
useAppDispatch, | ||
useAppSelector, | ||
useEffect, | ||
} from '~/bundles/common/hooks/hooks'; | ||
import { | ||
getBadgesData, | ||
getHardSkillsData, | ||
} from '~/bundles/common-data/store/actions'; | ||
import { type UseCommonDataReturn } from '~/bundles/common-data/types/types'; | ||
|
||
const useCommonData = (): UseCommonDataReturn => { | ||
const dispatch = useAppDispatch(); | ||
const { badgesData, dataStatus, hardSkillsData } = useAppSelector( | ||
({ commonData }) => commonData, | ||
); | ||
|
||
useEffect(() => { | ||
if (!badgesData) { | ||
void dispatch(getBadgesData()); | ||
} | ||
if (!hardSkillsData) { | ||
void dispatch(getHardSkillsData()); | ||
} | ||
}, [hardSkillsData, badgesData, dispatch]); | ||
|
||
return { dataStatus, badgesData, hardSkillsData }; | ||
}; | ||
|
||
export { useCommonData }; |
6 changes: 6 additions & 0 deletions
6
mobile/src/bundles/common-data/types/hard-skills/formatted-hard-skill-item.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
type FormattedHardSkillsItem = { | ||
label: string; | ||
value: string; | ||
}; | ||
|
||
export { type FormattedHardSkillsItem }; |
5 changes: 1 addition & 4 deletions
5
...-data/types/formatted-hard-skills-type.ts → ...hard-skills/formatted-hard-skills-type.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
mobile/src/bundles/common-data/types/hooks/use-common-data-return.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { type DataStatus } from '~/bundles/common/enums/enums'; | ||
import { type ValueOf } from '~/bundles/common/types/types'; | ||
import { | ||
type BadgesResponseDto, | ||
type FormattedHardSkills, | ||
} from '~/bundles/common-data/types/types'; | ||
|
||
type UseCommonDataReturn = { | ||
dataStatus: ValueOf<typeof DataStatus>; | ||
badgesData: BadgesResponseDto | null; | ||
hardSkillsData: FormattedHardSkills | null; | ||
}; | ||
|
||
export { type UseCommonDataReturn }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 0 additions & 22 deletions
22
mobile/src/bundles/common/components/badge/constants/constants.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.