Skip to content

Commit

Permalink
Hotfix for organizationRatingTab (#2454)
Browse files Browse the repository at this point in the history
* Hotfix for organizationRatingTab

### What's done:
* Added `pageSize` param to organization fetch
  • Loading branch information
sanyavertolet authored Aug 12, 2023
1 parent 22ad46d commit f11f86e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@ import web.cssom.*
import kotlinx.serialization.encodeToString
import kotlinx.serialization.json.Json

private const val DEFAULT_PAGE_SIZE = 10_000

val organizationRatingTab: FC<Props> = FC { _ ->
val (organizationFilter, setOrganizationFilter) = useState(OrganizationFilter.created)

val fetchOrganizationRequest: suspend WithRequestStatusContext.(OrganizationFilter) -> OrganizationArray = { filter ->
post(
url = "$apiUrl/organizations/all-by-filters",
url = "$apiUrl/organizations/all-by-filters?pageSize=$DEFAULT_PAGE_SIZE",
headers = jsonHeaders,
body = Json.encodeToString(filter),
loadingHandler = ::loadingHandler,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ import com.saveourtool.save.validation.FrontendRoutes
import js.core.jso
import org.w3c.fetch.Headers
import react.*
import react.dom.html.ReactHTML.canvas
import react.dom.html.ReactHTML.div
import react.dom.html.ReactHTML.h6
import react.dom.html.ReactHTML.hr
import react.dom.html.ReactHTML.main
import react.dom.html.ReactHTML.span
import web.cssom.*
Expand Down

0 comments on commit f11f86e

Please sign in to comment.