Skip to content

Commit

Permalink
fix spacings
Browse files Browse the repository at this point in the history
  • Loading branch information
JP Angelle committed Aug 31, 2023
1 parent 5dfb4bd commit 3a17887
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 15 deletions.
2 changes: 1 addition & 1 deletion centrifuge-app/src/components/PageSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export const PageSection: React.FC<Props> = ({
{headerRight}
</Shelf>
)}
<Box pl={[0, 0, 4]}>{collapsible ? <Collapsible open={open}>{children}</Collapsible> : children}</Box>
<Box pl={[0, 0, 0]}>{collapsible ? <Collapsible open={open}>{children}</Collapsible> : children}</Box>
</Stack>
)
}
1 change: 0 additions & 1 deletion centrifuge-app/src/components/PageSummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export const PageSummary: React.FC<Props> = ({ data, children, title }) => {
{title}
<Shelf
gap="6"
pl={4}
py="3"
style={{
boxShadow: `0 1px 0 ${theme.colors.borderSecondary}`,
Expand Down
22 changes: 9 additions & 13 deletions centrifuge-app/src/pages/Loan/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ const Loan: React.FC<{ setShowOraclePricing?: () => void }> = ({ setShowOraclePr

return (
<Stack>
<Box mt={2}>
<Box mt={2} ml={2}>
<RouterLinkButton to={`${basePath}/${poolId}/assets`} small icon={IconChevronLeft} variant="tertiary">
{poolMetadata?.pool?.name ?? 'Pool assets'}
</RouterLinkButton>
Expand Down Expand Up @@ -165,7 +165,7 @@ const Loan: React.FC<{ setShowOraclePricing?: () => void }> = ({ setShowOraclePr
<>
<PageSummary
title={
<Box mx={4} paddingTop={3}>
<Box paddingTop={3}>
<Shelf gap="2">
<Text variant="heading2">Details</Text>
<LoanLabel loan={loan} />
Expand Down Expand Up @@ -196,7 +196,7 @@ const Loan: React.FC<{ setShowOraclePricing?: () => void }> = ({ setShowOraclePr
{(!isTinlakePool || (isTinlakePool && loan.status === 'Closed' && 'dateClosed' in loan)) &&
'valuationMethod' in loan.pricing &&
loan.pricing.valuationMethod !== 'oracle' ? (
<PageSection title={<Box mx={4}>Financing & repayment cash flow</Box>}>
<PageSection title={<Box>Financing & repayment cash flow</Box>}>
<Shelf gap={3} flexWrap="wrap">
{isTinlakePool && loan.status === 'Closed' && 'dateClosed' in loan ? (
<LabelValueStack label="Date closed" value={formatDate(loan.dateClosed)} />
Expand All @@ -213,7 +213,7 @@ const Loan: React.FC<{ setShowOraclePricing?: () => void }> = ({ setShowOraclePr
) : null}

{'valuationMethod' in loan.pricing && loan.pricing.valuationMethod === 'oracle' && (
<PageSection title={<Box mx={4}>Holdings</Box>}>
<PageSection title={<Box>Holdings</Box>}>
<Shelf gap={6} flexWrap="wrap">
<HoldingsValues
loan={loan as LoanType & { pricing: ExternalPricingInfo }}
Expand All @@ -224,7 +224,7 @@ const Loan: React.FC<{ setShowOraclePricing?: () => void }> = ({ setShowOraclePr
</PageSection>
)}

<PageSection title={<Box mx={4}>Pricing</Box>}>
<PageSection title={<Box>Pricing</Box>}>
<Stack>
<Shelf gap={6} flexWrap="wrap">
<PricingValues loan={loan} pool={pool} />
Expand All @@ -244,7 +244,7 @@ const Loan: React.FC<{ setShowOraclePricing?: () => void }> = ({ setShowOraclePr
</PageSection>

{loan.status === 'Active' && (
<PageSection title={<Box mx={4}>Remaining maturity</Box>}>
<PageSection title={<Box>Remaining maturity</Box>}>
<Shelf gap={4} pt={maturityPercentage !== 1 ? 4 : 0}>
<LabelValueStack label="Origination date" value={formatDate(originationDate!)} />
<Box width="60%" backgroundColor="borderSecondary" position="relative">
Expand All @@ -266,7 +266,7 @@ const Loan: React.FC<{ setShowOraclePricing?: () => void }> = ({ setShowOraclePr
{borrowerAssetTransactions?.length ? (
<PageSection
title={
<Flex ml={4}>
<Flex>
<Text>Transaction history</Text>
</Flex>
}
Expand All @@ -281,11 +281,7 @@ const Loan: React.FC<{ setShowOraclePricing?: () => void }> = ({ setShowOraclePr
{templateData?.sections?.map((section, i) => {
const isPublic = section.attributes.every((key) => templateData.attributes?.[key]?.public)
return (
<PageSection
title={<Box ml={4}>{section.name}</Box>}
titleAddition={isPublic ? undefined : 'Private'}
key={i}
>
<PageSection title={<Box>{section.name}</Box>} titleAddition={isPublic ? undefined : 'Private'} key={i}>
{isPublic || document ? (
<Shelf gap={6} flexWrap="wrap">
{section.attributes.map((key) => {
Expand All @@ -303,7 +299,7 @@ const Loan: React.FC<{ setShowOraclePricing?: () => void }> = ({ setShowOraclePr
)
})}

<PageSection title={<Box mx={4}>NFT</Box>}>
<PageSection title={<Box>NFT</Box>}>
{isTinlakePool && 'owner' in loan ? (
<Shelf gap={6}>
<LabelValueStack label={<Tooltips variant="secondary" type="id" />} value={assetId} />
Expand Down

0 comments on commit 3a17887

Please sign in to comment.