@hed-hog/content 0.0.276 → 0.0.279

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.
@@ -167,9 +167,9 @@ export default function ContentsPage() {
167
167
  },
168
168
  });
169
169
 
170
- const { data: contents, refetch: refetch } = useQuery<
171
- PaginationResult<Content>
172
- >({
170
+ const { data: contents, refetch: refetch } = useQuery<
171
+ PaginationResult<Content>
172
+ >({
173
173
  queryKey: ['content', currentLocaleCode],
174
174
  queryFn: async () => {
175
175
  const response = await request({
@@ -180,16 +180,16 @@ export default function ContentsPage() {
180
180
  });
181
181
  return response.data as PaginationResult<Content>;
182
182
  },
183
- initialData: {
184
- data: [],
185
- total: 0,
186
- page: 1,
187
- pageSize: 10,
188
- lastPage: 1,
189
- prev: null,
190
- next: null,
191
- },
192
- });
183
+ });
184
+ const contentList = contents ?? {
185
+ data: [],
186
+ total: 0,
187
+ page: 1,
188
+ pageSize: 10,
189
+ lastPage: 1,
190
+ prev: null,
191
+ next: null,
192
+ };
193
193
 
194
194
  const getStatusBadge = (status: string) => {
195
195
  const statusOption = statusOptions.find((s) => s.value === status);
@@ -403,9 +403,9 @@ export default function ContentsPage() {
403
403
  </div>
404
404
 
405
405
  <div className="space-y-4">
406
- {contents.data.length > 0 ? (
407
- <div className="grid gap-4">
408
- {contents.data.map((content: Content) => (
406
+ {contentList.data.length > 0 ? (
407
+ <div className="grid gap-4">
408
+ {contentList.data.map((content: Content) => (
409
409
  <Card
410
410
  key={content.id}
411
411
  className="overflow-hidden transition-all duration-200 hover:border-primary/20 hover:shadow-md"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hed-hog/content",
3
- "version": "0.0.276",
3
+ "version": "0.0.279",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "dependencies": {
@@ -9,11 +9,11 @@
9
9
  "@nestjs/core": "^11",
10
10
  "@nestjs/jwt": "^11",
11
11
  "@nestjs/mapped-types": "*",
12
- "@hed-hog/api-pagination": "0.0.6",
13
12
  "@hed-hog/api-locale": "0.0.13",
14
- "@hed-hog/api-prisma": "0.0.5",
13
+ "@hed-hog/api-pagination": "0.0.6",
14
+ "@hed-hog/core": "0.0.279",
15
15
  "@hed-hog/api": "0.0.4",
16
- "@hed-hog/core": "0.0.276"
16
+ "@hed-hog/api-prisma": "0.0.5"
17
17
  },
18
18
  "exports": {
19
19
  ".": {