Skip to content

Commit

Permalink
Fixed config, it works again
Browse files Browse the repository at this point in the history
  • Loading branch information
pnicolli committed Nov 23, 2024
1 parent bd941ec commit 69cc21e
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 21 deletions.
4 changes: 0 additions & 4 deletions apps/nextjs/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import installPlone from '@plone/nextjs';
import config from '@plone/registry';
import cx from 'clsx';
import type { Viewport } from 'next';
import { Inter } from 'next/font/google';
Expand All @@ -8,8 +6,6 @@ import { getServerQueryClient, client as ploneClient } from '@/helpers/client';
import '@plone/components/src/styles/basic/theme.css';
import '@plone/components/src/styles/quanta/theme.css';

installPlone(config);

const inter = Inter({ subsets: ['latin'] });

const expand = ['breadcrumbs', 'navigation'];
Expand Down
4 changes: 4 additions & 0 deletions apps/nextjs/src/config/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import installPlone from '@plone/nextjs';
import config from '@plone/registry';

export default installPlone(config);
2 changes: 1 addition & 1 deletion apps/nextjs/src/helpers/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
} from '@tanstack/react-query';
import { cache } from 'react';
import PloneClient from '@plone/client';
import config from '@plone/registry';
import config from '@/config';

export const client = PloneClient.initialize({
apiPath: config.settings.apiPath,
Expand Down
2 changes: 1 addition & 1 deletion apps/nextjs/src/helpers/url.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import config from '@plone/registry';
import config from '@/config';

/**
* Flatten to app server URL - Given a URL if it starts with the API server URL
Expand Down
4 changes: 2 additions & 2 deletions packages/nextjs/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import { type ConfigType } from '@plone/registry';
import applyAddonConfiguration, { addonsInfo } from 'load-registry-addons'; // eslint-disable-line import/no-unresolved

export default function install(config: ConfigType): ConfigType {
applyAddonConfiguration(config);

const settings: Partial<ConfigType['settings']> = {
slate,
addonsInfo,
Expand Down Expand Up @@ -33,5 +31,7 @@ export default function install(config: ConfigType): ConfigType {

config.set('slots', {});

applyAddonConfiguration(config);

return config;
}
2 changes: 1 addition & 1 deletion packages/quanta/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ContentTypeCondition } from '@plone/slots/src/helpers';
import Event from './views/Event/Event';
import Page from './views/Page/Page';

export default function install(config: ConfigType) {
export default function install(config: ConfigType): ConfigType {
config.registerSlotComponent({
slot: 'main',
name: 'view',
Expand Down
24 changes: 12 additions & 12 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 69cc21e

Please sign in to comment.