Skip to content

Commit

Permalink
Fix home screen
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Saperstein committed Dec 5, 2024
1 parent 1225b27 commit 3b87adf
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions frontend/src/screens/home/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,24 @@ const StyledView = styled(View);

export default function HomeScreen({ navigation }: HomeScreenProps) {
const { signOut } = useAuth();

const userProfile = useInvestorProfile();
const [totalInvested, setTotalInvested] = useState(0);
const { portfolio } = useInvestorPortfolio();


useEffect(() => {
if (portfolio) {
// Sum up the total invested amount
const total = Object.values(portfolio).reduce((sum, value) => sum + value, 0);
setTotalInvested(total);
}
})
return (
<StyledView className='flex-1 mt-12'>
<Button onPress={() => { signOut(); }}>SIGN ME OUT</Button>
</StyledView>
);
});

// return (
// <StyledView className='flex-1 mt-12'>
// <Button onPress={() => { signOut(); }}>SIGN ME OUT</Button>
// </StyledView>
// );
// <StyledView className='flex-1 items-center justify-center bg-surfaceBG'>
// {/* Some dummy image */}
// <StyledView className='align-center'>
Expand Down

0 comments on commit 3b87adf

Please sign in to comment.