Skip to content

Commit

Permalink
SCRUM-143 Add SafeAreaView to Home Screen
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammadfadhli committed Oct 10, 2024
1 parent f4d8b26 commit a182c98
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/iQMA-Skills-Builder/app/screens/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import * as unitEndpoints from '@/helpers/unitEndpoints';
import * as lessonEndpoints from '@/helpers/lessonEndpoints';
import * as resultEndpoints from '@/helpers/resultEndpoints';
import { LoadingIndicator } from '@/components/LoadingIndicator';
import { SafeAreaView } from 'react-native-safe-area-context';

function calculateTotalProgress(i: number, totalUnits: number, getLessonIds: any[]) {
const uniqueAlphabets = new Set(getLessonIds);
Expand Down Expand Up @@ -396,6 +397,7 @@ const HomeScreen: React.FC = () => {
}

return (
<SafeAreaView>
<ScrollView contentContainerStyle={styles.container}>
{/* Top Stats */}
<TopStats circularProgress={sectionCircularProgress} />
Expand All @@ -417,14 +419,14 @@ const HomeScreen: React.FC = () => {
<Text>No sections available</Text>
)}
</ScrollView>
</SafeAreaView>
);
};

const styles = StyleSheet.create({
container: {
padding: 20,
backgroundColor: '#F5F5F5',
marginTop: 10,
},
lineSeparator: {
height: 1,
Expand Down

0 comments on commit a182c98

Please sign in to comment.