@hed-hog/core 0.0.371 → 0.0.373

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -58,6 +58,7 @@ import {
58
58
  TableHeader,
59
59
  TableRow,
60
60
  } from '@/components/ui/table';
61
+ import { TableBodySkeleton } from '@/components/ui/skeletons';
61
62
  import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs';
62
63
  import { usePagination } from '@/hooks/use-pagination';
63
64
  import { formatDate } from '@/lib/format-date';
@@ -781,6 +782,7 @@ function TypeTab({
781
782
  totalItems,
782
783
  search,
783
784
  setSearch,
785
+ isLoading,
784
786
  } = usePagination({ url: `/integration-profile?typeId=${typeId}` });
785
787
 
786
788
  useEffect(() => {
@@ -845,13 +847,7 @@ function TypeTab({
845
847
  placeholder={t('searchPlaceholder')}
846
848
  />
847
849
 
848
- {profiles.length === 0 ? (
849
- <EmptyState
850
- icon={<PlugZap className="h-12 w-12" />}
851
- title={t('noProfilesFound')}
852
- description={t('noProfilesHint')}
853
- />
854
- ) : (
850
+ {isLoading || profiles.length > 0 ? (
855
851
  <div className="rounded-md border">
856
852
  <Table>
857
853
  <TableHeader>
@@ -885,7 +881,10 @@ function TypeTab({
885
881
  </TableRow>
886
882
  </TableHeader>
887
883
  <TableBody>
888
- {profiles.map((profile) => (
884
+ {isLoading ? (
885
+ <TableBodySkeleton rows={pageSize} columns={9} />
886
+ ) : (
887
+ profiles.map((profile) => (
889
888
  <TableRow
890
889
  key={profile.id}
891
890
  className="cursor-pointer"
@@ -966,10 +965,17 @@ function TypeTab({
966
965
  </div>
967
966
  </TableCell>
968
967
  </TableRow>
969
- ))}
968
+ ))
969
+ )}
970
970
  </TableBody>
971
971
  </Table>
972
972
  </div>
973
+ ) : (
974
+ <EmptyState
975
+ icon={<PlugZap className="h-12 w-12" />}
976
+ title={t('noProfilesFound')}
977
+ description={t('noProfilesHint')}
978
+ />
973
979
  )}
974
980
 
975
981
  <PaginationFooter
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hed-hog/core",
3
- "version": "0.0.371",
3
+ "version": "0.0.373",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -43,10 +43,10 @@
43
43
  "uuid": "^11.1.0",
44
44
  "@hed-hog/api": "0.0.8",
45
45
  "@hed-hog/api-locale": "0.0.14",
46
+ "@hed-hog/api-mail": "0.0.9",
46
47
  "@hed-hog/api-pagination": "0.0.7",
47
48
  "@hed-hog/api-types": "0.0.1",
48
- "@hed-hog/api-prisma": "0.0.6",
49
- "@hed-hog/api-mail": "0.0.9"
49
+ "@hed-hog/api-prisma": "0.0.6"
50
50
  },
51
51
  "exports": {
52
52
  ".": {