Skip to content

Commit

Permalink
feat: created ImageDetail
Browse files Browse the repository at this point in the history
  • Loading branch information
ap221882 committed Jan 10, 2023
1 parent b591f56 commit 0412be4
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 0 deletions.
2 changes: 2 additions & 0 deletions miscellaneous/react-native/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { createStackNavigator } from "react-navigation-stack";
import HomeScreen from "./src/screens/HomeScreen";
import ComponentsScreen from "./src/screens/ComponentsScreen";
import ListScreen from "./src/screens/ListScreen";
import ImageScreen from "./src/screens/ImageScreen";

/**
* * From react-navigation library used for routing
Expand All @@ -12,6 +13,7 @@ const navigator = createStackNavigator(
Home: HomeScreen,
Components: ComponentsScreen,
List: ListScreen,
ImageScreen,
},
{
initialRouteName: "Home",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions miscellaneous/react-native/src/components/ImageDetail.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { StyleSheet, Text, View, Image } from "react-native";
import React from "react";
import mountain from "../../assets/images/mountain.jpg";

const ImageDetail = () => {
return (
<View>
<Image source={mountain} />
<Text>ImageDetail</Text>
</View>
);
};

export default ImageDetail;

const styles = StyleSheet.create({});
4 changes: 4 additions & 0 deletions miscellaneous/react-native/src/screens/HomeScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ const HomeScreen = ({ navigation: { navigate } }) => {
onPress={() => navigate("Components")}
/>
<Button title="Go to List Screen" onPress={() => navigate("List")} />
<Button
title="Go to Image Screen"
onPress={() => navigate("ImageScreen")}
/>
{/* Highly Customisable and can detect press on any kind of element */}
{/* <TouchableOpacity onPress={() => navigate("List")}>
<Text>Go to List screen</Text>
Expand Down
17 changes: 17 additions & 0 deletions miscellaneous/react-native/src/screens/ImageScreen.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import React from "react";
import { StyleSheet, View, Text } from "react-native";

import ImageDetail from "../components/ImageDetail";

const ImageScreen = () => {
return (
<View>
<ImageDetail />
<ImageDetail />
<ImageDetail />
</View>
);
};
export default ImageScreen;

const styles = StyleSheet.create({});

2 comments on commit 0412be4

@vercel
Copy link

@vercel vercel bot commented on 0412be4 Jan 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

namaste-react – ./Day12/github-api-project-ts

namaste-react-ap221882.vercel.app
namaste-react.vercel.app
namaste-react-git-main-ap221882.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 0412be4 Jan 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

namaste-react-parcel – ./Day3

namaste-react-parcel-ap221882.vercel.app
namaste-react-parcel.vercel.app
namaste-react-parcel-git-main-ap221882.vercel.app

Please sign in to comment.