Skip to content

Commit

Permalink
fix: reviewed changes
Browse files Browse the repository at this point in the history
Signed-off-by: karan <[email protected]>
  • Loading branch information
16-karan committed Sep 18, 2023
1 parent 4a80b8b commit ab2db63
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/api/organization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ export const createConnection = async (orgName: string) => {

// public profile

export const getPublicUsers = async (pageNumber: number, pageSize: number, search = '') => {
export const getPublicUsers = async (pageNumber: number, pageSize: number, search :string) => {

const url = `${apiRoutes.public.users}?pageNumber=${pageNumber}&pageSize=${pageSize}&search=${search}`

Expand All @@ -321,7 +321,7 @@ export const getPublicUsers = async (pageNumber: number, pageSize: number, searc
}
}

export const getPublicOrganizations = async (pageNumber: number, pageSize: number, search = '') => {
export const getPublicOrganizations = async (pageNumber: number, pageSize: number, search :string) => {

const url = `${apiRoutes.public.organizations}?pageNumber=${pageNumber}&pageSize=${pageSize}&search=${search}`

Expand Down
2 changes: 1 addition & 1 deletion src/components/publicProfile/OrgUserInfoLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const { orgUsersData } = Astro.props;
: 'text-gray-700 text-sm px-2 py-1 rounded-lg my-1.5 pl-1 bg-red-400'
}
>
{orgUser?.publicProfile ? 'Public Account' : 'Private Account'}
{orgUser?.publicProfile ? 'Public account' : 'Private account'}
</span>

{orgUser?.publicProfile && (
Expand Down
8 changes: 4 additions & 4 deletions src/components/publicProfile/OrganisationPublicProfile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ const OrganisationPublicProfile = () => {
const getAllOrganizations = async () => {
setLoading(true);
const response = await getPublicOrganizations(
currentPage.pageNumber,
currentPage.pageSize,
currentPage?.pageNumber,
currentPage?.pageSize,
searchText,
);

const { data } = response as AxiosResponse;

if (data?.statusCode === apiStatusCodes.API_STATUS_SUCCESS) {
if (data?.statusCode === apiStatusCodes?.API_STATUS_SUCCESS) {
const totalPages = data?.data?.totalPages;

const orgList = data?.data?.organizations.map((userOrg: any) => {
Expand All @@ -62,7 +62,7 @@ const OrganisationPublicProfile = () => {
useEffect(() => {
let getData: NodeJS.Timeout;

if (searchText.length >= 1) {
if (searchText?.length >= 1) {
getData = setTimeout(() => {
getAllOrganizations();
}, 1000);
Expand Down

0 comments on commit ab2db63

Please sign in to comment.