Skip to content

Commit

Permalink
mock inventory system
Browse files Browse the repository at this point in the history
  • Loading branch information
danny-zou18 committed Nov 28, 2024
1 parent 0a11968 commit 614d7c3
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
import { View, Text } from "react-native";
import { View, Text, Image } from "react-native";
import React from "react";
import EquippedItems from "./EquippedItems";
import CharacterView from "./CharacterView";

const CharacterEquippedItems = () => {
return (
<View className="ml-auto w-[90%] bg-red-400">
<View className="ml-auto flex h-72 w-[90%] flex-row items-center gap-12 ">
<EquippedItems />
<Image
className="h-64 w-40 rounded-md"
source={require("@/assets/images/cat.jpg")}
/>
</View>
);
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { View, Text, Image } from "react-native";
import React from "react";

const CharacterView = () => {
return (
<View className="">
<Image
className="h-24 w-24 rounded-md"
source={require("@/assets/images/cat.jpg")}
/>
</View>
);
};

export default CharacterView;
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,15 @@ import { Item } from "@/types/db_types";

const EquippedItems = () => {
return (
<View className="flex flex-row gap-2 bg-blue-400">
<View className="flex flex-row gap-5 ">
<View className="flex flex-col gap-2">
<EquippedItem type="headgear" item={null} />
<View className="h-[50px] w-[50px] rounded-md bg-gray-500">
<Image
source={require("@/assets/Inventory/test.png")}
className="h-full w-full rounded-md"
resizeMode="contain"
/>
</View>
<EquippedItem type="chestgeat" item={null} />
<EquippedItem type="leggear" item={null} />
<EquippedItem type="footgear" item={null} />
Expand All @@ -29,7 +35,7 @@ interface EquippedItemProps {

const EquippedItem: React.FC<EquippedItemProps> = ({ type, item }) => {
return (
<View className="h-[50px] w-[50px] rounded-md bg-white">
<View className="h-[50px] w-[50px] rounded-md bg-gray-500">
<Image
source={item ? (item.path ? itemPaths[Number(item.id)] : null) : null}
className="h-full w-full rounded-md"
Expand Down
4 changes: 1 addition & 3 deletions lifescape-app/components/home/CharacterOverview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ const CharacterOverview = () => {
</View>
<Image
className="z-0 h-full w-full rounded-md"
source={{
uri: "https://media1.tenor.com/m/sepKXIenuG0AAAAC/cat-meme-cat-meme-face.gif",
}}
source={require("@/assets/images/cat.jpg")}
/>
<View
className={`absolute bottom-[-.5rem] z-10 flex flex-row bg-transparent ${
Expand Down

0 comments on commit 614d7c3

Please sign in to comment.