diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..815aa5a --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,18 @@ +module.exports = { + root: true, + extends: ["universe/native"], + plugins: ["unused-imports"], + rules: { + "no-unused-vars": "off", + "unused-imports/no-unused-imports": "error", + "unused-imports/no-unused-vars": [ + "warn", + { + vars: "all", + varsIgnorePattern: "^_", + args: "after-used", + argsIgnorePattern: "^_", + }, + ], + }, +}; diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 0e34ad0..ac6a2c2 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -23,4 +23,4 @@ jobs: run: npm run format-check - name: Type check - run: npm run type-check \ No newline at end of file + run: npm run type-check diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index a741221..bea9b00 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -1,34 +1,34 @@ on: - pull_request: - types: [opened, synchronize] - jobs: - preview: - runs-on: ubuntu-latest - permissions: - contents: read - pull-requests: write # Allow comments on PRs - steps: - - name: 🏗 Setup repo - uses: actions/checkout@v3 - - - name: 🏗 Setup Node - uses: actions/setup-node@v3 - with: - node-version: 18.x - cache: yarn - - - name: 🏗 Setup EAS - uses: expo/expo-github-action@v8 - with: - eas-version: latest - token: ${{ secrets.EXPO_TOKEN }} - - - name: 📦 Install dependencies - run: yarn install - - - name: 🚀 Create preview - uses: expo/expo-github-action/preview@v8 - with: - # `github.event.pull_request.head.ref` is only available on `pull_request` triggers. - # Use your own, or keep the automatically infered branch name from `--auto`, when using different triggers. - command: eas update --auto --branch ${{ github.event.pull_request.head.ref }} \ No newline at end of file + pull_request: + types: [opened, synchronize] + jobs: + preview: + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write # Allow comments on PRs + steps: + - name: 🏗 Setup repo + uses: actions/checkout@v3 + + - name: 🏗 Setup Node + uses: actions/setup-node@v3 + with: + node-version: 18.x + cache: yarn + + - name: 🏗 Setup EAS + uses: expo/expo-github-action@v8 + with: + eas-version: latest + token: ${{ secrets.EXPO_TOKEN }} + + - name: 📦 Install dependencies + run: yarn install + + - name: 🚀 Create preview + uses: expo/expo-github-action/preview@v8 + with: + # `github.event.pull_request.head.ref` is only available on `pull_request` triggers. + # Use your own, or keep the automatically infered branch name from `--auto`, when using different triggers. + command: eas update --auto --branch ${{ github.event.pull_request.head.ref }} diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 865569b..88cffff 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -36,4 +36,3 @@ jobs: - name: Expo GitHub Action uses: expo/expo-github-action@8.2.1 - \ No newline at end of file diff --git a/README.md b/README.md index db9e915..f2fc0cc 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ **This is an application for Society Housing managment which is created for the purpose of MCA collaborative project.** -```Built with Expo-react-Native``` -```This will have features such as:``` +`Built with Expo-react-Native` +`This will have features such as:` + 1. Community Page 2. Call for services and book amenties 3. manage services in the society @@ -11,16 +12,16 @@ 8. keep a proper track of records and much more features to be added -```Why Residentron?``` +`Why Residentron?` + - We are focusing on being open source and using open source tech stack, which will reduce the cost for customers to pay minimal prices and experiece a seamless connected world while being at home -- ``` Tech Stack includes (not finalised) ``` +- `Tech Stack includes (not finalised)` - Expo - Supabase - SQLite -``` USP?: ``` +`USP?:` We are trying to develop it based on age for user (ex: better color modes, font sizes, notification customization, automation, restriction for children), basically something for everyone - figma link: https://www.figma.com/file/CUdRvs42DT7ZTRutq617pM/Wireframe-1?type=design&node-id=1-2&mode=design&t=TPgUYMvRyLzLWx31-0 diff --git a/app.json b/app.json index 4a774aa..326aaf5 100644 --- a/app.json +++ b/app.json @@ -12,9 +12,7 @@ "resizeMode": "contain", "backgroundColor": "#ffffff" }, - "assetBundlePatterns": [ - "**/*" - ], + "assetBundlePatterns": ["**/*"], "ios": { "supportsTablet": true, "bundleIdentifier": "com.cheetahworks.residentron" @@ -31,9 +29,7 @@ "output": "static", "favicon": "./assets/images/favicon.png" }, - "plugins": [ - "expo-router" - ], + "plugins": ["expo-router"], "experiments": { "typedRoutes": false }, diff --git a/app/(tabs)/[id].tsx b/app/(tabs)/[id].tsx index d92cd09..59ab71e 100644 --- a/app/(tabs)/[id].tsx +++ b/app/(tabs)/[id].tsx @@ -1,6 +1,6 @@ -import React from 'react'; -import { View, Text, StyleSheet } from 'react-native'; -import { useLocalSearchParams, Stack } from 'expo-router'; +import { useLocalSearchParams, Stack } from "expo-router"; +import React from "react"; +import { View, Text, StyleSheet } from "react-native"; const NewPage = () => { const { id } = useLocalSearchParams(); @@ -16,15 +16,15 @@ const NewPage = () => { const styles = StyleSheet.create({ container: { flex: 1, - justifyContent: 'center', - alignItems: 'center', - backgroundColor: '#F5FCFF', // Add your desired background color + justifyContent: "center", + alignItems: "center", + backgroundColor: "#F5FCFF", // Add your desired background color }, text: { fontSize: 20, - textAlign: 'center', + textAlign: "center", margin: 10, - color: '#333', // Add your desired text color + color: "#333", // Add your desired text color }, }); diff --git a/app/(tabs)/_layout.tsx b/app/(tabs)/_layout.tsx index ffc0085..e92790a 100644 --- a/app/(tabs)/_layout.tsx +++ b/app/(tabs)/_layout.tsx @@ -1,4 +1,3 @@ - import FontAwesome from "@expo/vector-icons/FontAwesome"; import { Link, Tabs } from "expo-router"; import React from "react"; @@ -20,12 +19,10 @@ export default function RootLayout() { const colorScheme = useColorScheme(); return ( - - - , headerTitleAlign: "center", headerStyle: { @@ -47,16 +44,28 @@ export default function RootLayout() { ), }} /> - , - headerShown: false}}/> - , - headerShown: false}}/> - , - headerShown: false}}/> - + , + headerShown: false, + }} + /> + , + headerShown: false, + }} + /> + , + headerShown: false, + }} + /> + ); } diff --git a/app/(tabs)/account.tsx b/app/(tabs)/account.tsx index f2d2b8a..77fa627 100644 --- a/app/(tabs)/account.tsx +++ b/app/(tabs)/account.tsx @@ -1,8 +1,14 @@ -import { View, Text, TouchableOpacity, ScrollView, StyleSheet, Button } from 'react-native' import { BottomSheetModal, useBottomSheetModal } from "@gorhom/bottom-sheet"; -import React, { useRef } from 'react' +import React, { useRef } from "react"; +import { + Text, + TouchableOpacity, + ScrollView, + StyleSheet, + Button, +} from "react-native"; -import AccountSheet from '../../components/bottomSheet'; +import AccountSheet from "../../components/bottomSheet"; //TODO: add a notification icon //TODO: add a profile icon @@ -11,7 +17,7 @@ import AccountSheet from '../../components/bottomSheet'; //TODO: current and past utilities, current and past maintenance, current and past bills, current and past orders, current and past payments, current and past receipts, current and past complaints, current and past suggestions, current and past feedbacks, current and past polls, current and past announcements, current and past notices, current and past chats, current and past events, current and past posts, current and past family members, current and past parking, current and past flat no, current and past name, current and past email, current and past phone number, current and past address, current and past profile picture, current and past edit button //TODO: add a logout button -const account = () => { +const Account = () => { const bottomSheetRef = useRef(null); const { dismiss } = useBottomSheetModal(); const handleOpenPress = () => bottomSheetRef.current?.present(); @@ -45,50 +51,47 @@ const account = () => {