<commit_before>import React, { Component } from 'react'
import {
    Text,
    View
} from 'react-native'
import { ScrollableTabBar }
       from 'react-native-scrollable-tab-view'
import { computed } from 'mobx'
import { observer } from 'mobx-react/native'

// Importing Pages
import { DiscoverPage } from './screens//DiscoverPage'
import { BarPage } from './screens/BarPage'
import { MenuPage } from './screens/MenuPage'
import { OrderPage } from './screens/OrderPage'

import { handleBackButton } from './components/AndroidBackButton'
import { SideMenu } from './components/sidemenu/SideMenu'
import { ControlPanel } from './components/sidemenu/ControlPanel'
import { TabView } from './components/Tabs'
import { Loader } from './components/Page'

import { store, barStore, tabStore } from '~/src/model/store'
import * as _ from './utils/curry'

const { log, assert } = _.utils('~/Main')

/* Do not allow font scaling */
Text.defaultProps.allowFontScaling = false

const style = {
    title: {
        color: '#E72D6B',
        fontWeight: 'bold'
    }
}

@observer
export class Main extends Component {
    static route = {
        navigationBar: {
            title: 'QDodger',
            backgroundColor: '#fff',
            titleStyle: style.title
        }
    }
    @computed get barSelected () {
        return !barStore.barID || tabStore.currentPage !== 0
    }
    render = () => {
        if (!store.initialized) {
            return <Loader />
        }
        if (!this.barSelected) {
            return <DiscoverPage />
        }
        return (
            <View style={{flex: 1}}>
              <SideMenu content={<ControlPanel />}>
                  <View style={{flex: 1, flexDirection: 'row'}}>
                      {/*
                      <Checkout />
                      <ReceiptModal />
                      */}
                      <TabView>
                          <View tabLabel='Discover' style={{flex: 1}}>
                              <DiscoverPage />
                          </View>
                          <View tabLabel='Bar' style={{flex: 1}}>
                              <BarPage /><commit_msg>small fix main<commit_after>import React, { Component } from 'react'
import {
    Text,
    View
} from 'react-native'
import { ScrollableTabBar }
       from 'react-native-scrollable-tab-view'
import { computed } from 'mobx'
import { observer } from 'mobx-react/native'

// Importing Pages
import { DiscoverPage } from './screens//DiscoverPage'
import { BarPage } from './screens/BarPage'
import { MenuPage } from './screens/MenuPage'
import { OrderPage } from './screens/OrderPage'

import { handleBackButton } from './components/AndroidBackButton'
import { SideMenu } from './components/sidemenu/SideMenu'
import { ControlPanel } from './components/sidemenu/ControlPanel'
import { TabView } from './components/Tabs'
import { Loader } from './components/Page'

import { store, barStore, tabStore } from './model/store'
import * as _ from './utils/curry'

const { log, assert } = _.utils('~/src/Main')

/* Do not allow font scaling */
Text.defaultProps.allowFontScaling = false

const style = {
    title: {
        color: '#E72D6B',
        fontWeight: 'bold'
    }
}

@observer
export class Main extends Component {
    static route = {
        navigationBar: {
            title: 'QDodger',
            backgroundColor: '#fff',
            titleStyle: style.title
        }
    }
    @computed get barSelected () {
        return !!barStore.barID || tabStore.currentPage !== 0
    }
    render = () => {
        if (!store.initialized) {
            return <Loader />
        }
        if (!this.barSelected) {
            return <DiscoverPage />
        }
        return (
            <View style={{flex: 1}}>
              <SideMenu content={<ControlPanel />}>
                  <View style={{flex: 1, flexDirection: 'row'}}>
                      {/*
                      <Checkout />
                      <ReceiptModal />
                      */}
                      <TabView>
                          <View tabLabel='Discover' style={{flex: 1}}>
                              <DiscoverPage />
                          </View>
                          <View tabLabel='Bar' style={{flex: 1}}>
                              <BarPage />
{'fraction_non_alphanumeric': 0.12965549348230912, 'fraction_numerical': 0.0037243947858473, 'mean_word_length': 1.8048302872062663, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2164518', 'n_tokens_mistral': 1207, 'n_tokens_neox': 1178, 'n_words': 290}