mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-22 22:49:45 +01:00
minor refactoring
This commit is contained in:
@@ -513,9 +513,9 @@ const styles = StyleSheet.create({
|
||||
alignItems: 'center',
|
||||
},
|
||||
container: {
|
||||
width: DDS.isTab ? '50%' : '100%',
|
||||
height: DDS.isTab ? '80%' : '100%',
|
||||
maxHeight: DDS.isTab ? '80%' : '100%',
|
||||
width: DDS.isTab ? 500 : '100%',
|
||||
height: DDS.isTab ? 600 : '100%',
|
||||
maxHeight: DDS.isTab ? 600 : '100%',
|
||||
borderRadius: DDS.isTab ? 5 : 0,
|
||||
paddingHorizontal: ph,
|
||||
paddingVertical: pv,
|
||||
|
||||
@@ -2,6 +2,7 @@ import {createDrawerNavigator} from '@react-navigation/drawer';
|
||||
import {NavigationContainer} from '@react-navigation/native';
|
||||
import {createStackNavigator} from '@react-navigation/stack';
|
||||
import * as React from 'react';
|
||||
import {Dimensions} from 'react-native';
|
||||
import Container from '../components/Container';
|
||||
import {Menu} from '../components/Menu';
|
||||
import {rootNavigatorRef, sideMenuRef} from '../utils/refs';
|
||||
@@ -61,7 +62,7 @@ const DrawerComponent = (props) => {
|
||||
<Menu
|
||||
menuProps={props}
|
||||
hide={false}
|
||||
noTextMode={DDS.isTab}
|
||||
noTextMode={DDS.isTab && !DDS.isSmallTab}
|
||||
close={() => NavigationService.closeDrawer()}
|
||||
/>
|
||||
);
|
||||
@@ -94,11 +95,15 @@ export const NavigationStack = ({component = MainComponent}) => {
|
||||
swipeEnabled: locked ? false : true,
|
||||
}}
|
||||
drawerStyle={{
|
||||
width:DDS.isTab? w *0.04 : w*0.75,
|
||||
borderRightColor:'#f0f0f0'
|
||||
width: DDS.isTab && !DDS.isSmallTab
|
||||
? Dimensions.get('window').width * 0.05
|
||||
: DDS.isSmallTab
|
||||
? '40%'
|
||||
: Dimensions.get('window').width * 0.75,
|
||||
borderRightWidth: 0,
|
||||
}}
|
||||
edgeWidth={200}
|
||||
drawerType={DDS.isTab ? 'permanent' : 'slide'}
|
||||
drawerType={DDS.isTab || DDS.isSmallTab ? 'permanent' : 'slide'}
|
||||
drawerContent={DrawerComponent}
|
||||
initialRouteName="Main">
|
||||
<Drawer.Screen name="Main" component={component} />
|
||||
|
||||
@@ -7,6 +7,8 @@ import {generateSecureRandom} from 'react-native-securerandom';
|
||||
import Sodium from 'react-native-sodium';
|
||||
import RNFetchBlob from 'rn-fetch-blob';
|
||||
import {db, requestStoragePermission, ToastEvent} from './utils';
|
||||
|
||||
|
||||
export const MMKV = new MMKVStorage.Loader().initialize();
|
||||
async function read(key, isArray = false) {
|
||||
let data;
|
||||
|
||||
Reference in New Issue
Block a user