Skip to content

Commit

Permalink
req changes: styling
Browse files Browse the repository at this point in the history
  • Loading branch information
jarbacoa committed May 24, 2021
1 parent 3461c08 commit a53969b
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 10 deletions.
6 changes: 4 additions & 2 deletions src/components/pages/Home/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,18 +101,20 @@ const Home = React.memo(() => {
<InputLeftElement
pointerEvents="none"
height="100%"
color="grey"
children={<SearchIcon color="gray.300" boxSize={5} />}
ml={1}
/>

<Input
border="3px solid red"
border="3px solid"
borderColor="grey"
height="100%"
placeholder="Search by token, pool or product..."
_placeholder={{ color: "grey.500", fontWeight: "bold" }}
_placeholder={{ color: "grey", fontWeight: "bold" }}
onChange={({ target: { value } }) => setVal(value)}
value={val}
color="grey"
/>
</InputGroup>
</form>
Expand Down
2 changes: 1 addition & 1 deletion src/components/pages/Home/HomeFuseCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const HomeFuseCard = ({ pool }: { pool: FusePoolData | undefined }) => {
})}
</AvatarGroup>

<Heading size="sm">{title ?? pool?.name}</Heading>
<Heading size="sm" mt={2}>{title ?? pool?.name}</Heading>
<Text size="xs" color="gray.500" fontWeight="bold">
{subtitle ?? assetsSubtitle}
</Text>
Expand Down
4 changes: 2 additions & 2 deletions src/components/pages/Stats/StatsFuseSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { motion } from "framer-motion";
import { useFusePools } from "hooks/fuse/useFusePools";
import { useFusePoolsData } from "hooks/useFusePoolData";
import { useBorrowLimits } from "hooks/useBorrowLimit";
import { useAssetsMapWithTokenData } from "hooks/useAssetsMap";
import { useAssetsArrayWithTokenData } from "hooks/useAssetsMap";

import { FusePoolData, USDPricedFuseAsset } from "utils/fetchFusePoolData";
import { TokenData } from "hooks/useTokenData";
Expand Down Expand Up @@ -49,7 +49,7 @@ const Fuse = () => {
const maxBorrows = useBorrowLimits(assetsArray);

const { tokensDataMap }: { tokensDataMap: TokensDataHash } =
useAssetsMapWithTokenData(assetsArray);
useAssetsArrayWithTokenData(assetsArray);

const totalBorrowBalanceUSD =
fusePoolsData?.reduce((a, b) => {
Expand Down
1 change: 1 addition & 0 deletions src/components/shared/Header2/NewHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useState } from "react";

import {
Box,
Heading,
Expand Down
4 changes: 2 additions & 2 deletions src/hooks/useAssetsMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ type AssetsMapWithTokenDataReturn = {
tokensDataMap: TokensDataHash; // hashmap of unique assets and their token data
};

// This returns a Hashmap
export const useAssetsMapWithTokenData = (
// This returns a Hashmap and the original array with tokenData inserted
export const useAssetsArrayWithTokenData = (
assetsArray: USDPricedFuseAsset[][] | null
): AssetsMapWithTokenDataReturn => {
const assetsMap: AssetHash | null = useAssetsMap(assetsArray);
Expand Down
4 changes: 2 additions & 2 deletions src/hooks/useFusePoolData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
USDPricedFuseAsset,
USDPricedFuseAssetWithTokenData,
} from "../utils/fetchFusePoolData";
import { useAssetsMapWithTokenData } from "./useAssetsMap";
import { useAssetsArrayWithTokenData } from "./useAssetsMap";

export const useFusePoolData = (
poolId: string | undefined
Expand Down Expand Up @@ -68,7 +68,7 @@ export const useFusePoolsData = (poolIds: number[]): FusePoolData[] | null => {
assetsArrayWithTokenData,
}: {
assetsArrayWithTokenData: USDPricedFuseAssetWithTokenData[][] | null;
} = useAssetsMapWithTokenData(assetsArray);
} = useAssetsArrayWithTokenData(assetsArray);

return useMemo(() => {
if (assetsArrayWithTokenData && fusePoolsData) {
Expand Down
1 change: 0 additions & 1 deletion src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ img:not([src]) {
.carousel-root {
/* background-color: orange; */
height: 100%;
padding: 20px;
}
}

Expand Down

0 comments on commit a53969b

Please sign in to comment.