empty list when loading
This commit is contained in:
parent
c60f6c039a
commit
43f5572779
@ -87,7 +87,7 @@ export function Cases() {
|
||||
if (!list.ok && !list.loading) {
|
||||
return handleNotOkResult(i18n)(list);
|
||||
}
|
||||
|
||||
const records = list.loading ? [] : list.data.records
|
||||
return (
|
||||
<div>
|
||||
<div class="px-4 sm:px-6 lg:px-8">
|
||||
@ -130,7 +130,7 @@ export function Cases() {
|
||||
</div>
|
||||
<div class="mt-8 flow-root">
|
||||
<div class="-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
|
||||
{!list.data.records.length ? (
|
||||
{!records.length ? (
|
||||
<div>empty result </div>
|
||||
) : (
|
||||
<div class="inline-block min-w-full py-2 align-middle sm:px-6 lg:px-8">
|
||||
@ -159,7 +159,7 @@ export function Cases() {
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-200 bg-white">
|
||||
{list.data.records.map((r) => {
|
||||
{records.map((r) => {
|
||||
return (
|
||||
<tr class="hover:bg-gray-100 ">
|
||||
<td class="whitespace-nowrap px-3 py-5 text-sm text-gray-500 ">
|
||||
|
@ -158,7 +158,6 @@ interface useBackendType {
|
||||
sandboxCashoutFetcher: <T>(endpoint: string[]) => Promise<HttpResponseOk<T>>;
|
||||
}
|
||||
export function usePublicBackend(): useBackendType {
|
||||
const { state } = useBackendContext();
|
||||
const { request: requestHandler } = useApiContext();
|
||||
|
||||
const baseUrl = getInitialBackendBaseURL();
|
||||
|
Loading…
Reference in New Issue
Block a user