Skip to content

Commit 2c6a545

Browse files
committed
feat: app working and prettier files
1 parent 5455712 commit 2c6a545

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1181
-356
lines changed

.prettierrc.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
module.exports = {
22
arrowParens: 'always',
33
bracketSameLine: true,
4-
bracketSpacing: false,
4+
bracketSpacing: true,
55
singleQuote: true,
66
trailingComma: 'all',
7-
plugins: ['prettier-plugin-tailwindcss'],
87
};

App.tsx

+11-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
import 'react-native-gesture-handler';
2-
import { Router } from "./src/router";
3-
import { MachinesProvider } from './src/context'
2+
import { ActionSheetProvider } from '@expo/react-native-action-sheet';
3+
import { Router } from './src/router';
4+
import { MachinesProvider } from './src/context';
45
import { StatusBar } from 'react-native';
56

67
export default function App() {
78
return (
8-
<MachinesProvider>
9-
<StatusBar translucent barStyle={'default'} />
10-
<Router />
11-
</MachinesProvider>
12-
)
13-
}
9+
<ActionSheetProvider>
10+
<MachinesProvider>
11+
<StatusBar translucent barStyle={'default'} />
12+
<Router />
13+
</MachinesProvider>
14+
</ActionSheetProvider>
15+
);
16+
}

README.md

+2-78
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,3 @@
1-
This is a new [**React Native**](https://reactnative.dev) project, bootstrapped using [`@react-native-community/cli`](https://github.com/react-native-community/cli).
1+
## Offline Note Taking App
22

3-
# Getting Started
4-
5-
>**Note**: Make sure you have completed the [React Native - Environment Setup](https://reactnative.dev/docs/environment-setup) instructions till "Creating a new application" step, before proceeding.
6-
7-
## Step 1: Start the Metro Server
8-
9-
First, you will need to start **Metro**, the JavaScript _bundler_ that ships _with_ React Native.
10-
11-
To start Metro, run the following command from the _root_ of your React Native project:
12-
13-
```bash
14-
# using npm
15-
npm start
16-
17-
# OR using Yarn
18-
yarn start
19-
```
20-
21-
## Step 2: Start your Application
22-
23-
Let Metro Bundler run in its _own_ terminal. Open a _new_ terminal from the _root_ of your React Native project. Run the following command to start your _Android_ or _iOS_ app:
24-
25-
### For Android
26-
27-
```bash
28-
# using npm
29-
npm run android
30-
31-
# OR using Yarn
32-
yarn android
33-
```
34-
35-
### For iOS
36-
37-
```bash
38-
# using npm
39-
npm run ios
40-
41-
# OR using Yarn
42-
yarn ios
43-
```
44-
45-
If everything is set up _correctly_, you should see your new app running in your _Android Emulator_ or _iOS Simulator_ shortly provided you have set up your emulator/simulator correctly.
46-
47-
This is one way to run your app — you can also run it directly from within Android Studio and Xcode respectively.
48-
49-
## Step 3: Modifying your App
50-
51-
Now that you have successfully run the app, let's modify it.
52-
53-
1. Open `App.tsx` in your text editor of choice and edit some lines.
54-
2. For **Android**: Press the <kbd>R</kbd> key twice or select **"Reload"** from the **Developer Menu** (<kbd>Ctrl</kbd> + <kbd>M</kbd> (on Window and Linux) or <kbd>Cmd ⌘</kbd> + <kbd>M</kbd> (on macOS)) to see your changes!
55-
56-
For **iOS**: Hit <kbd>Cmd ⌘</kbd> + <kbd>R</kbd> in your iOS Simulator to reload the app and see your changes!
57-
58-
## Congratulations! :tada:
59-
60-
You've successfully run and modified your React Native App. :partying_face:
61-
62-
### Now what?
63-
64-
- If you want to add this new React Native code to an existing application, check out the [Integration guide](https://reactnative.dev/docs/integration-with-existing-apps).
65-
- If you're curious to learn more about React Native, check out the [Introduction to React Native](https://reactnative.dev/docs/getting-started).
66-
67-
# Troubleshooting
68-
69-
If you can't get this to work, see the [Troubleshooting](https://reactnative.dev/docs/troubleshooting) page.
70-
71-
# Learn More
72-
73-
To learn more about React Native, take a look at the following resources:
74-
75-
- [React Native Website](https://reactnative.dev) - learn more about React Native.
76-
- [Getting Started](https://reactnative.dev/docs/environment-setup) - an **overview** of React Native and how setup your environment.
77-
- [Learn the Basics](https://reactnative.dev/docs/getting-started) - a **guided tour** of the React Native **basics**.
78-
- [Blog](https://reactnative.dev/blog) - read the latest official React Native **Blog** posts.
79-
- [`@facebook/react-native`](https://github.com/facebook/react-native) - the Open Source; GitHub **repository** for React Native.
3+
-

__tests__/App.test.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import React from 'react';
77
import App from '../App';
88

99
// Note: import explicitly to use the types shiped with jest.
10-
import {it} from '@jest/globals';
10+
import { it } from '@jest/globals';
1111

1212
// Note: test renderer must be required after react-native.
1313
import renderer from 'react-test-renderer';

index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
* @format
33
*/
44

5-
import {AppRegistry} from 'react-native';
5+
import { AppRegistry } from 'react-native';
66
import App from './App';
7-
import {name as appName} from './app.json';
7+
import { name as appName } from './app.json';
88

99
AppRegistry.registerComponent(appName, () => App);

ios/Podfile.lock

+6
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,8 @@ PODS:
524524
- RNScreens (3.27.0):
525525
- RCT-Folly (= 2021.07.22.00)
526526
- React-Core
527+
- RNSVG (13.14.0):
528+
- React-Core
527529
- SocketRocket (0.6.1)
528530
- Yoga (1.14.0)
529531
- YogaKit (1.18.1):
@@ -597,6 +599,7 @@ DEPENDENCIES:
597599
- RNGestureHandler (from `../node_modules/react-native-gesture-handler`)
598600
- RNReanimated (from `../node_modules/react-native-reanimated`)
599601
- RNScreens (from `../node_modules/react-native-screens`)
602+
- RNSVG (from `../node_modules/react-native-svg`)
600603
- Yoga (from `../node_modules/react-native/ReactCommon/yoga`)
601604

602605
SPEC REPOS:
@@ -704,6 +707,8 @@ EXTERNAL SOURCES:
704707
:path: "../node_modules/react-native-reanimated"
705708
RNScreens:
706709
:path: "../node_modules/react-native-screens"
710+
RNSVG:
711+
:path: "../node_modules/react-native-svg"
707712
Yoga:
708713
:path: "../node_modules/react-native/ReactCommon/yoga"
709714

@@ -763,6 +768,7 @@ SPEC CHECKSUMS:
763768
RNGestureHandler: 6e46dde1f87e5f018a54fe5d40cd0e0b942b49ee
764769
RNReanimated: d1fe60092b25662522a0bf9f788a5d4e437b885b
765770
RNScreens: 3c2d122f5e08c192e254c510b212306da97d2581
771+
RNSVG: d00c8f91c3cbf6d476451313a18f04d220d4f396
766772
SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
767773
Yoga: b76f1acfda8212aa16b7e26bcce3983230c82603
768774
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,53 @@
11
{
2-
"images" : [
2+
"images": [
33
{
4-
"idiom" : "iphone",
5-
"scale" : "2x",
6-
"size" : "20x20"
4+
"idiom": "iphone",
5+
"scale": "2x",
6+
"size": "20x20"
77
},
88
{
9-
"idiom" : "iphone",
10-
"scale" : "3x",
11-
"size" : "20x20"
9+
"idiom": "iphone",
10+
"scale": "3x",
11+
"size": "20x20"
1212
},
1313
{
14-
"idiom" : "iphone",
15-
"scale" : "2x",
16-
"size" : "29x29"
14+
"idiom": "iphone",
15+
"scale": "2x",
16+
"size": "29x29"
1717
},
1818
{
19-
"idiom" : "iphone",
20-
"scale" : "3x",
21-
"size" : "29x29"
19+
"idiom": "iphone",
20+
"scale": "3x",
21+
"size": "29x29"
2222
},
2323
{
24-
"idiom" : "iphone",
25-
"scale" : "2x",
26-
"size" : "40x40"
24+
"idiom": "iphone",
25+
"scale": "2x",
26+
"size": "40x40"
2727
},
2828
{
29-
"idiom" : "iphone",
30-
"scale" : "3x",
31-
"size" : "40x40"
29+
"idiom": "iphone",
30+
"scale": "3x",
31+
"size": "40x40"
3232
},
3333
{
34-
"idiom" : "iphone",
35-
"scale" : "2x",
36-
"size" : "60x60"
34+
"idiom": "iphone",
35+
"scale": "2x",
36+
"size": "60x60"
3737
},
3838
{
39-
"idiom" : "iphone",
40-
"scale" : "3x",
41-
"size" : "60x60"
39+
"idiom": "iphone",
40+
"scale": "3x",
41+
"size": "60x60"
4242
},
4343
{
44-
"idiom" : "ios-marketing",
45-
"scale" : "1x",
46-
"size" : "1024x1024"
44+
"idiom": "ios-marketing",
45+
"scale": "1x",
46+
"size": "1024x1024"
4747
}
4848
],
49-
"info" : {
50-
"author" : "xcode",
51-
"version" : 1
49+
"info": {
50+
"author": "xcode",
51+
"version": 1
5252
}
5353
}
+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"info" : {
3-
"version" : 1,
4-
"author" : "xcode"
2+
"info": {
3+
"version": 1,
4+
"author": "xcode"
55
}
66
}

metro.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
1+
const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config');
22

33
/**
44
* Metro configuration

package.json

+9-1
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,29 @@
99
"start": "react-native start",
1010
"install:pods": "pnpx pod-install",
1111
"test": "jest",
12-
"typegen": "xstate typegen \"./src/**/*.ts?(x)\""
12+
"typegen": "xstate typegen \"./src/machines/*.machine.ts\"",
13+
"postinstall": "pnpm typegen",
14+
"prettier:all": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\""
1315
},
1416
"dependencies": {
17+
"@expo/react-native-action-sheet": "^4.0.1",
1518
"@react-native-async-storage/async-storage": "^1.19.4",
1619
"@react-navigation/native": "^6.1.9",
1720
"@react-navigation/stack": "^6.3.20",
21+
"@xstate/cli": "^0.5.7",
1822
"@xstate/react": "^3.2.2",
23+
"classnames": "^2.3.2",
1924
"formik": "^2.4.5",
2025
"nativewind": "^2.0.11",
2126
"react": "18.2.0",
2227
"react-native": "0.72.6",
2328
"react-native-gesture-handler": "^2.13.4",
29+
"react-native-heroicons": "^3.2.0",
2430
"react-native-reanimated": "^3.5.4",
2531
"react-native-safe-area-context": "^4.7.4",
2632
"react-native-screens": "^3.27.0",
33+
"react-native-svg": "^13.14.0",
34+
"use-debounce": "^9.0.4",
2735
"xstate": "^4.38.3",
2836
"xstate-logger": "^0.0.3",
2937
"yup": "^1.3.2",

0 commit comments

Comments
 (0)