File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
packages/smooth-core/src/client Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 1
1
import React from 'react'
2
2
import gql from 'graphql-tag'
3
3
import {
4
+ getFragment ,
4
5
getFragmentDefinition ,
5
6
getFragmentString ,
6
7
getComponent ,
7
8
getDefinitionType ,
8
9
getDefinitionName ,
9
10
} from './util'
10
11
11
- function getBlock ( filePath , mod ) {
12
- const { blockFragment : fragment } = mod
13
- if ( ! fragment ) return null
14
-
12
+ function getBlock ( filePath , exp ) {
13
+ const fragment = getFragment ( exp , 'blockFragment' , filePath )
15
14
const fragmentDefinition = getFragmentDefinition ( fragment )
16
- const Component = getComponent ( mod , filePath )
15
+ const Component = getComponent ( exp , filePath )
17
16
const type = getDefinitionType ( fragmentDefinition )
18
17
const name = getDefinitionName ( fragmentDefinition )
19
18
const propsAttribute = `${ type } _props`
You can’t perform that action at this time.
0 commit comments