Skip to content

Commit

Permalink
new reader
Browse files Browse the repository at this point in the history
  • Loading branch information
GunkaArtur committed Mar 12, 2024
1 parent b539713 commit 30eb203
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions public/editor-client/src/defaultTemplates/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Json } from "@brizy/readers";
import { Config } from "../config";
import {
BlocksArray,
Expand All @@ -20,7 +21,6 @@ import {
StoriesWithThumbs
} from "../types/DefaultTemplate";
import { t } from "../utils/i18n";
import { read } from "../utils/reader/json";
import { tempConverterKit } from "./tempComverters";
import {
convertPages,
Expand Down Expand Up @@ -327,7 +327,9 @@ const defaultPages = (
`${apiPagesUrl}/get-page-data?page_slug=${slug}`
).then((r) => r.json());

const pageData = read(data[0].pageData) as { items: DefaultBlock[] };
const pageData = Json.read(data[0].pageData) as {
items: DefaultBlock[];
};

res({
blocks: [...pageData.items]
Expand Down

0 comments on commit 30eb203

Please sign in to comment.