[resumes][feat] add helpful text when no resume shown

This commit is contained in:
Wu Peirong
2022-10-20 22:35:52 +08:00
parent 4526867601
commit 7c467d2e0e
2 changed files with 70 additions and 21 deletions

View File

@@ -139,3 +139,13 @@ export const SHORTCUTS: Array<Shortcut> = [
sortOrder: 'latest',
},
];
export const isInitialFilterState = (filters: FilterState) =>
Object.keys(filters).every((filter) => {
if (!['experience', 'location', 'role'].includes(filter)) {
return true;
}
return INITIAL_FILTER_STATE[filter as FilterId].every((value) =>
filters[filter as FilterId].includes(value),
);
});