Skip to content

Commit

Permalink
Addressed changes
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdulWahab3181 committed Jan 25, 2024
1 parent 2ed7c57 commit 54bbd3d
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions src/pages/tickets/org/orgHeader/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ const SkillContainer = styled.span`
padding: 10px 0px;
align-items: center;
gap: 4px;
width: max-content;
`;
const Skill = styled.select`
border: none;
Expand Down Expand Up @@ -328,6 +329,19 @@ export const OrgHeader = ({
window.open(githubUrl, '_blank');
};

const handleSearch = (searchText: string) => {
const currentPath = window.location.pathname;
const pathSegments = currentPath.split('/');
const paramValue = pathSegments[pathSegments.length - 1];

main.getPeopleBounties({
page: 1,
resetPage: true,
search: searchText,
org_uuid: paramValue
});
};

useEffect(() => {
if (org_uuid) {
main.getSpecificOrganizationBounties(org_uuid, {
Expand Down Expand Up @@ -458,15 +472,7 @@ export const OrgHeader = ({
}}
onKeyUp={(e: any) => {
if (e.key === 'Enter' || e.keyCode === 13) {
const currentPath = window.location.pathname;
const pathSegments = currentPath.split('/');
const paramValue = pathSegments[pathSegments.length - 1];
main.getPeopleBounties({
page: 1,
resetPage: true,
search: e.target.value,
org_uuid: paramValue
});
handleSearch(e.target.value);
}
}}
TextColor={color.grayish.G100}
Expand Down

0 comments on commit 54bbd3d

Please sign in to comment.