export default function (glyphMap, fontName, expoAssetId, fontStyle) {
var _a;
const font = { [fontName]: expoAssetId };
const RNVIconComponent = createIconSet(glyphMap, fontName, null, fontStyle);
return _a = class Icon extends React.Component {
constructor() {
super(...arguments);
this._mounted = false;
this.state = {
fontIsLoaded: Font.isLoaded(fontName)
};
}
async componentDidMount() {
this._mounted = true;
if (!this.state.fontIsLoaded) {
await Font.loadAsync(font);
this._mounted && this.setState({ fontIsLoaded: true });
}
}
componentWillUnmount() {
this._mounted = false;
}
setNativeProps(props) {
if (this._icon) {
this._icon.setNativeProps(props);
}
}
render() {
if (!this.state.fontIsLoaded) {
return <Text />;
}
return (<RNVIconComponent ref={view => {
this._icon = view;
}} {...this.props}/>);
}
},
_a.propTypes = RNVIconComponent.propTypes,
_a.defaultProps = RNVIconComponent.defaultProps,
_a.Button = createIconButtonComponent(_a),
_a.glyphMap = glyphMap,
_a.getRawGlyphMap = () => glyphMap,
_a.getFontFamily = () => fontName,
_a.loadFont = () => Font.loadAsync(font),
_a.font = font,
_a;
}
//# sourceMappingURL=createIconSet.js.map
I am trying to run react-native-app created by someone, and got this error "Failed to compile". I know it's not mutch what I'am showing here but if someone got any idea how can I start. /node_modules/@expo/vector-icons/build/createIconSet.js: Unexpected token, expected "," (36:33)enter image description here