Skip to content

Commit 5e262bc

Browse files
committed
init
1 parent c7f1935 commit 5e262bc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+18868
-0
lines changed
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
node_modules/
2+
.expo/
3+
dist/
4+
npm-debug.*
5+
*.jks
6+
*.p8
7+
*.p12
8+
*.key
9+
*.mobileprovision
10+
*.orig.*
11+
web-build/
12+
13+
# macOS
14+
.DS_Store
15+
16+
# @generated expo-cli sync-2b81b286409207a5da26e14c78851eb30d8ccbdb
17+
# The following patterns were generated by expo-cli
18+
19+
expo-env.d.ts
20+
# @end expo-cli

ReactNative/rate-repository/README.md

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Welcome to your Expo app 👋
2+
3+
This is an [Expo](https://expo.dev) project created with [`create-expo-app`](https://www.npmjs.com/package/create-expo-app).
4+
5+
## Get started
6+
7+
1. Install dependencies
8+
9+
```bash
10+
npm install
11+
```
12+
13+
2. Start the app
14+
15+
```bash
16+
npx expo start
17+
```
18+
19+
In the output, you'll find options to open the app in a
20+
21+
- [development build](https://docs.expo.dev/develop/development-builds/introduction/)
22+
- [Android emulator](https://docs.expo.dev/workflow/android-studio-emulator/)
23+
- [iOS simulator](https://docs.expo.dev/workflow/ios-simulator/)
24+
- [Expo Go](https://expo.dev/go), a limited sandbox for trying out app development with Expo
25+
26+
You can start developing by editing the files inside the **app** directory. This project uses [file-based routing](https://docs.expo.dev/router/introduction).
27+
28+
## Get a fresh project
29+
30+
When you're ready, run:
31+
32+
```bash
33+
npm run reset-project
34+
```
35+
36+
This command will move the starter code to the **app-example** directory and create a blank **app** directory where you can start developing.
37+
38+
## Learn more
39+
40+
To learn more about developing your project with Expo, look at the following resources:
41+
42+
- [Expo documentation](https://docs.expo.dev/): Learn fundamentals, or go into advanced topics with our [guides](https://docs.expo.dev/guides).
43+
- [Learn Expo tutorial](https://docs.expo.dev/tutorial/introduction/): Follow a step-by-step tutorial where you'll create a project that runs on Android, iOS, and the web.
44+
45+
## Join the community
46+
47+
Join our community of developers creating universal apps.
48+
49+
- [Expo on GitHub](https://github.com/expo/expo): View our open source platform and contribute.
50+
- [Discord community](https://chat.expo.dev): Chat with Expo users and ask questions.

ReactNative/rate-repository/app.json

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"expo": {
3+
"name": "rate-repository",
4+
"slug": "rate-repository",
5+
"version": "1.0.0",
6+
"orientation": "portrait",
7+
"icon": "./assets/images/icon.png",
8+
"scheme": "myapp",
9+
"userInterfaceStyle": "automatic",
10+
"splash": {
11+
"image": "./assets/images/splash.png",
12+
"resizeMode": "contain",
13+
"backgroundColor": "#ffffff"
14+
},
15+
"ios": {
16+
"supportsTablet": true
17+
},
18+
"android": {
19+
"adaptiveIcon": {
20+
"foregroundImage": "./assets/images/adaptive-icon.png",
21+
"backgroundColor": "#ffffff"
22+
}
23+
},
24+
"web": {
25+
"bundler": "metro",
26+
"output": "static",
27+
"favicon": "./assets/images/favicon.png"
28+
},
29+
"plugins": [
30+
"expo-router"
31+
],
32+
"experiments": {
33+
"typedRoutes": true
34+
}
35+
}
36+
}
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import React from 'react';
2+
import Main from '../components/Main';
3+
4+
const App = () => {
5+
return (
6+
<>
7+
<Main />
8+
</>
9+
10+
);
11+
};
12+
13+
export default App;
14+
Binary file not shown.
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = function (api) {
2+
api.cache(true);
3+
return {
4+
presets: ['babel-preset-expo'],
5+
};
6+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import Constants from 'expo-constants';
2+
import { Text, StyleSheet, View } from 'react-native';
3+
import RepositoryList from './RepositoryList';
4+
5+
const styles = StyleSheet.create({
6+
container: {
7+
marginTop: Constants.statusBarHeight,
8+
flexGrow: 1,
9+
flexShrink: 1,
10+
},
11+
header: {
12+
fontSize: 24,
13+
fontWeight: '700',
14+
},
15+
text: {
16+
color: 'blue',
17+
fontSize: 20,
18+
}
19+
20+
});
21+
22+
const Main = () => {
23+
return(
24+
<View style= {styles.container}>
25+
<View>
26+
<Text style={styles.header}> Rate Repository Application </Text>
27+
</View>
28+
<View >
29+
<RepositoryList />
30+
</View>
31+
</View>
32+
33+
)
34+
};
35+
36+
37+
38+
export default Main;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import { View, Text, Image, StyleSheet } from 'react-native';
2+
3+
type RepositoryItemProps = {
4+
repository: {
5+
id: string;
6+
fullName: string;
7+
description: string;
8+
language: string;
9+
forksCount: number;
10+
stargazersCount: number;
11+
ratingAverage: number;
12+
reviewCount: number;
13+
ownerAvatarUrl: string;
14+
}
15+
};
16+
17+
const RepositoryItem = ({ repository } : RepositoryItemProps) => {
18+
return (
19+
<View>
20+
<Image
21+
source={{ uri: repository.ownerAvatarUrl }}
22+
style={{ width: 50, height: 50, borderRadius: 25}}
23+
/>
24+
<Text>Full Name: {repository.fullName}</Text>
25+
<Text>Description: {repository.description}</Text>
26+
<Text>Language: {repository.language}</Text>
27+
<Text>Stars: {repository.forksCount}</Text>
28+
<Text>Reviews: {repository.reviewCount}</Text>
29+
<Text>Rating: {repository.ratingAverage}</Text>
30+
</View>
31+
)
32+
};
33+
34+
export default RepositoryItem;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
import { FlatList, View, StyleSheet } from "react-native";
2+
import RepositoryItem from "./RepositoryItem";
3+
4+
const styles = StyleSheet.create({
5+
separator: {
6+
height: 10,
7+
},
8+
});
9+
10+
const repositories = [
11+
{
12+
id: 'jaredpalmer.formik',
13+
fullName: 'jaredpalmer/formik',
14+
description: 'Build forms in React, without the tears',
15+
language: 'TypeScript',
16+
forksCount: 1589,
17+
stargazersCount: 21553,
18+
ratingAverage: 88,
19+
reviewCount: 4,
20+
ownerAvatarUrl: 'https://avatars2.githubusercontent.com/u/4060187?v=4',
21+
},
22+
{
23+
id: 'rails.rails',
24+
fullName: 'rails/rails',
25+
description: 'Ruby on Rails',
26+
language: 'Ruby',
27+
forksCount: 18349,
28+
stargazersCount: 45377,
29+
ratingAverage: 100,
30+
reviewCount: 2,
31+
ownerAvatarUrl: 'https://avatars1.githubusercontent.com/u/4223?v=4',
32+
},
33+
{
34+
id: 'django.django',
35+
fullName: 'django/django',
36+
description: 'The Web framework for perfectionists with deadlines.',
37+
language: 'Python',
38+
forksCount: 21015,
39+
stargazersCount: 48496,
40+
ratingAverage: 73,
41+
reviewCount: 5,
42+
ownerAvatarUrl: 'https://avatars2.githubusercontent.com/u/27804?v=4',
43+
},
44+
{
45+
id: 'reduxjs.redux',
46+
fullName: 'reduxjs/redux',
47+
description: 'Predictable state container for JavaScript apps',
48+
language: 'TypeScript',
49+
forksCount: 13902,
50+
stargazersCount: 52869,
51+
ratingAverage: 0,
52+
reviewCount: 0,
53+
ownerAvatarUrl: 'https://avatars3.githubusercontent.com/u/13142323?v=4',
54+
},
55+
];
56+
57+
const ItemSeparator = () => <View style={styles.separator} />;
58+
59+
const RepositoryList = () => {
60+
return(
61+
<FlatList
62+
data={repositories}
63+
renderItem={({ item }) => <RepositoryItem repository={item} />}
64+
ItemSeparatorComponent={ItemSeparator}
65+
/>
66+
)
67+
};
68+
69+
export default RepositoryList;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import theme from "./theme";
2+
import {Text, StyleSheet} from "react-native";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
const theme = {
2+
colors: {
3+
textPrimary: '#24292e',
4+
textSecondary: '#586069',
5+
primary: '#0366d6',
6+
},
7+
fontSizes: {
8+
body: 14,
9+
subheading: 16,
10+
},
11+
fonts: {
12+
main: 'System',
13+
},
14+
fontWeights: {
15+
normal: '400',
16+
bold: '700',
17+
},
18+
};
19+
20+
export default theme

0 commit comments

Comments
 (0)