File tree Expand file tree Collapse file tree 4 files changed +4
-9
lines changed Expand file tree Collapse file tree 4 files changed +4
-9
lines changed Original file line number Diff line number Diff line change 1
1
import { isBlank , uuid8 , camelize } from '@/misc/utils'
2
2
import { normalize as coreNormalize } from 'normalizr'
3
- import { findSectionDefinition } from './theme'
4
3
import { SECTION_SCHEMA } from './page'
5
4
6
5
const NUMBER_OF_DEFAULT_BLOCKS = 3
Original file line number Diff line number Diff line change @@ -5,10 +5,4 @@ export const buildCategories = (theme) => {
5
5
. filter ( ( section ) => section . category == category . id )
6
6
. sort ( ( a , b ) => a . name . localeCompare ( b . name ) ) ,
7
7
} ) )
8
- }
9
-
10
- export const findSectionDefinition = ( theme , sectionContent ) => {
11
- return theme . sections . find (
12
- ( definition ) => definition [ 'id' ] === sectionContent [ 'type' ] ,
13
- )
14
8
}
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ const siteService = {
14
14
}
15
15
16
16
const themeService = {
17
- buildCategories : vi . fn ( ) ,
17
+ buildCategories : vi . fn ( )
18
18
}
19
19
20
20
const pageService = {
Original file line number Diff line number Diff line change @@ -58,7 +58,9 @@ export default (services) => ({
58
58
sectionDefinition :
59
59
( { theme } ) =>
60
60
( sectionContent ) => {
61
- return services . theme . findSectionDefinition ( theme , sectionContent )
61
+ return theme . sections . find (
62
+ ( definition ) => definition [ 'id' ] === sectionContent [ 'type' ]
63
+ )
62
64
} ,
63
65
sectionSettings :
64
66
( { sectionDefinition } ) =>
You can’t perform that action at this time.
0 commit comments