Skip to content

Commit

Permalink
Merge pull request #331 from dhruv036/develop
Browse files Browse the repository at this point in the history
Removed OOOForm data after submitting and UI change
  • Loading branch information
shreya-mishra authored Nov 13, 2023
2 parents c3deebc + 5caae9d commit eb5f059
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/components/OOO/OOOForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ const styles = StyleSheet.create({
color: '#000000',
},
SubmitButtonContainer: {
backgroundColor: '#808080',
backgroundColor: '#0034a5',
paddingVertical: 10,
paddingHorizontal: 12,
width: '30%',
Expand All @@ -129,7 +129,7 @@ const styles = StyleSheet.create({
SubmitButtonText: {
color: '#fff',
alignSelf: 'center',
borderWidth: 1,
fontWeight: 'bold',
borderColor: '#808080',
},
});
6 changes: 4 additions & 2 deletions src/screens/HomeScreen/HomeScreenV2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ const HomeScreenV2 = (): JSX.Element => {
updatedAt: formatTimeToUnix(currentDate),
},
};
const res = await submitOOOForm(data, loggedInUserData?.token);
console.log(res);
await submitOOOForm(data, loggedInUserData?.token);
setDescription('');
setToDate(tomorrowDate);
setFromDate(currentDate);
setIsLoading(false); // Clear loading state after API call
setIsFormVisible(false); // Hide the form after a successful submission
};
Expand Down
7 changes: 1 addition & 6 deletions src/screens/ProfileScreen/ProfileScreen2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Strings from '../../i18n/en';
import UserData from './User Data/UserData';
import { useSelector, useDispatch } from 'react-redux';
import All from './UserDataV2/All';
import Note from './UserDataV2/NoteWorthy';
// import Note from './UserDataV2/NoteWorthy';
import { Tabs } from 'react-native-collapsible-tab-view';
import { useFocusEffect } from '@react-navigation/native';
import { fetchContribution } from '../AuthScreen/Util';
Expand Down Expand Up @@ -117,11 +117,6 @@ const ProfileScreen = () => {
const ProfileScreen2: React.FC = () => {
return (
<Tabs.Container renderHeader={ProfileScreen}>
<Tabs.Tab name="Noteworthy">
<Tabs.ScrollView>
<Note />
</Tabs.ScrollView>
</Tabs.Tab>
<Tabs.Tab name="Active">
<Tabs.ScrollView>
<ActiveScreen />
Expand Down

0 comments on commit eb5f059

Please sign in to comment.