Skip to content

Commit

Permalink
Merge branch 'develop' into 250/UIEnhancement
Browse files Browse the repository at this point in the history
  • Loading branch information
JAYATEJA04 authored Oct 9, 2023
2 parents af170ec + b2abae6 commit e4f9620
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 29 deletions.
20 changes: 0 additions & 20 deletions .github/workflows/android-continous-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,6 @@ jobs:
- name: Install yarn dependencies
run: |
yarn install
- name: Create config file
run: |
cp ./config/config.sample.js ./config/config.js
- name: Find and Replace clientId
uses: jacobtomlinson/gha-find-replace@v2
with:
find: '<client-id>'
replace: ${{ secrets.CLIENT_GITHUB_ID }}
include: 'config/config.js'
regex: true

- name: Find and Replace clientSecret
uses: jacobtomlinson/gha-find-replace@v2
with:
find: '<client-secret>'
replace: ${{ secrets.CLIENT_GITHUB_SECRET }}
include: 'config/config.js'

- name: Make Gradlew Executable
run: cd android && chmod +x ./gradlew
- name: Build Android Release
Expand Down
19 changes: 15 additions & 4 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,27 @@ jobs:
- name: Make Gradlew Executable
run: cd android && chmod +x ./gradlew

- name: build release
run: cd android && ./gradlew assembleRelease
- name: Build assets folder
run: |
cd android/app/src/main &&
if [ -d "assets" ]; then
rm -r assets
fi
- name: Build release
run: |
mkdir -p android/app/src/main/assets &&
npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res &&
cd android &&
./gradlew assembleDebug
- name: list files
run: ls -lrt android/app/build/outputs/apk/release
run: ls -lrt android/app/build/outputs/apk/debug

- name: upload artifact to Firebase App Distribution
uses: wzieba/[email protected]
with:
appId: ${{secrets.FIREBASE_APP_ID}}
token: ${{secrets.FIREBASE_TOKEN}}
groups: ${{secrets.GROUPS}}
file: android/app/build/outputs/apk/release/app-release.apk
file: android/app/build/outputs/apk/debug/app-debug.apk
5 changes: 5 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ def enableHermes = project.ext.react.get("enableHermes", false);
def nativeArchitectures = project.getProperties().get("reactNativeDebugArchitectures")

android {

lintOptions {
checkReleaseBuilds false
}

ndkVersion rootProject.ext.ndkVersion

compileSdkVersion rootProject.ext.compileSdkVersion
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"format-check": "prettier --check ./src",
"format-fix": "prettier --write ./src",
"precommit-check": "yarn run format-fix && yarn run lint",
"build": "npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res; cd android ; ./gradlew assembleDebug"
"build-assets-folder": "cd android/app/src/main && if [ -d 'assets' ]; then rm -r assets; fi",
"build": "mkdir -p android/app/src/main/assets && npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res && cd android && ./gradlew assembleDebug"
},
"dependencies": {
"@react-native-async-storage/async-storage": "^1.15.16",
Expand Down
2 changes: 1 addition & 1 deletion src/screens/AuthScreen/Util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,6 @@ export const formatTimeToUnix = (date) => {
const newDate = new Date(date);

// Convert the date to Unix Epoch timestamp in seconds
const unixTimestampInSeconds = newDate.getTime() / 1000;
const unixTimestampInSeconds = newDate.getTime();
return unixTimestampInSeconds;
};
7 changes: 5 additions & 2 deletions src/screens/HomeScreen/HomeScreenV2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ const HomeScreenV2 = (): JSX.Element => {

const handleButtonPress = async () => {
if (status === 'OOO') {
setIsLoading(true);
await cancelOoo(loggedInUserData?.token);
setIsLoading(false);
} else {
setIsFormVisible((prev) => !prev);
}
Expand All @@ -50,10 +52,11 @@ const HomeScreenV2 = (): JSX.Element => {
message: description,
state: 'OOO',
until: formatTimeToUnix(toDate),
updateAt: formatTimeToUnix(Date.now),
updatedAt: formatTimeToUnix(currentDate),
},
};
await submitOOOForm(data, loggedInUserData?.token);
const res = await submitOOOForm(data, loggedInUserData?.token);
console.log(res);
setIsLoading(false); // Clear loading state after API call
setIsFormVisible(false); // Hide the form after a successful submission
};
Expand Down
2 changes: 1 addition & 1 deletion src/screens/ProfileScreen/ProfileScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ import UploadImageModalView from '../../components/GalleryModal';
import { AuthContext } from '../../context/AuthContext';
import { ImagePickerResponse } from 'react-native-image-picker';
import Strings from '../../i18n/en';
import AllContributionsDropdown from './User Data/UserContributions/AllContributions';
import NoteworthyContributionsDropdown from './User Data/UserContributions/NoteWorthyContributions';
import ActiveTaskDropDown from './User Data/UserContributions/ActiveTask';
import UserData from './User Data/UserData';
import { useSelector, useDispatch } from 'react-redux';
import { AuthViewStyle } from '../AuthScreen/styles';
import AllContributionsDropdown from './User Data/UserContributions/AllContributions';

const ProfileScreen = () => {
const dispatch = useDispatch();
Expand Down

0 comments on commit e4f9620

Please sign in to comment.