Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

Commit

Permalink
remove layout service
Browse files Browse the repository at this point in the history
  • Loading branch information
Gebov committed Dec 19, 2023
1 parent abec3ab commit bdf7a97
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 86 deletions.
7 changes: 5 additions & 2 deletions src/nextjs-framework/pages/render-widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { initRestSdk } from './utils';
import { RenderWidgetService } from '../services/render-widget-service';
import { WidgetModel } from '../editor/widget-framework/widget-model';
import { RequestContext } from '../editor/request-context';
import { LayoutService } from '../rest-sdk';
import { RestService } from '../rest-sdk';

export async function RenderWidget({ searchParams }: { searchParams: { [key: string]: string } }) {
await initRestSdk();
Expand All @@ -25,7 +25,10 @@ export async function RenderWidget({ searchParams }: { searchParams: { [key: str
let params = new URLSearchParams(query);
const paramsAsObject = Object.fromEntries(params);

const layout = await LayoutService.get(path, paramsAsObject);
const layout = await RestService.getLayout({
pagePath: path,
queryParams: paramsAsObject
});
const requestContext: RequestContext = {
layout: layout,
searchParams: paramsAsObject,
Expand Down
2 changes: 1 addition & 1 deletion src/nextjs-framework/pages/utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Metadata } from 'next';
import { notFound } from 'next/navigation';
import { PageParams } from './page-params';
import { PageLayoutServiceResponse, LayoutService, GetAllArgs } from '../rest-sdk/services';
import { PageLayoutServiceResponse, GetAllArgs } from '../rest-sdk/services';
import { ServiceMetadata } from '../rest-sdk/service-metadata';
import { RootUrlService } from '../rest-sdk/root-url.service';
import { RenderWidgetService } from '../services/render-widget-service';
Expand Down
83 changes: 0 additions & 83 deletions src/nextjs-framework/rest-sdk/services/layout.service.ts

This file was deleted.

0 comments on commit bdf7a97

Please sign in to comment.