Skip to content

Commit 9377f13

Browse files
committed
Added conditional for Native to only export components
1 parent c4d938e commit 9377f13

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/containers/LeftContainer.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ interface StateInt {
6666
genOptions: string[];
6767
genOption: number;
6868
imageSource: string;
69+
native: boolean;
6970
}
7071

7172
const mapStateToProps = (store: any) => ({
@@ -240,9 +241,13 @@ class LeftContainer extends Component<LeftContPropsInt, StateInt> {
240241

241242
showGenerateAppModal = () => {
242243
const { closeModal, chooseGenOptions } = this;
243-
const { genOptions } = this.state;
244+
let { genOptions } = this.state;
245+
const { native } = this.props;
244246
const children = (
245247
<List className="export-preference">
248+
{/* native mode does not export file structure, so 'Components Only' is the only export option */}
249+
{native ? genOptions.splice(1, 1) : ''}
250+
246251
{genOptions.map((option, i) => (
247252
<ListItem
248253
key={i}

0 commit comments

Comments
 (0)