Skip to content

Commit

Permalink
Merge pull request #290 from Real-Dev-Squad/fix/Pipeline.yml
Browse files Browse the repository at this point in the history
Fix/pipeline.yml
  • Loading branch information
shreya-mishra authored Oct 9, 2023
2 parents f1f85cf + d04dcab commit 2ab515d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
run: cd android && chmod +x ./gradlew

- name: build release
run: cd android && ./gradlew assembleRelease
run: 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
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 @@ -19,11 +19,11 @@ 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 AllContributionsDropdown from './User Data/UserContributions/AllContributions';

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

0 comments on commit 2ab515d

Please sign in to comment.