Skip to content

Commit

Permalink
Add nav bar style changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kattylucy committed Oct 15, 2024
1 parent 1d3a10d commit 716c711
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ function PoolPerformanceChart() {
seniorAPY: formattedSeniorAPY,
}
}) || [],
[truncatedPoolStates, todayAssetValue, pool, range]
[truncatedPoolStates, todayAssetValue, pool, range, todayJuniorApy, todaySeniorApy]
)

const today = {
Expand Down
8 changes: 5 additions & 3 deletions centrifuge-app/src/components/LayoutBase/styles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ export const Inner = styled(Grid)`
@media (min-width: ${({ theme }) => theme.breakpoints['L']}) {
width: 15vw;
background-color: ${({ theme }) => theme.colors.backgroundInverted};
padding-left: 16px;
padding-left: 12px;
padding-right: 20px;
height: 100vh;
}
`
Expand Down Expand Up @@ -100,7 +101,7 @@ export const LogoContainer = styled(Stack)`
height: ${HEADER_HEIGHT}px;
justify-content: center;
padding-left: 12px;
padding-left: 8px;
@media (min-width: ${({ theme }) => theme.breakpoints['M']}) and (max-width: ${({ theme }) =>
theme.breakpoints['L']}) {
Expand All @@ -111,7 +112,7 @@ export const LogoContainer = styled(Stack)`
@media (min-width: ${({ theme }) => theme.breakpoints['L']}) {
justify-content: start;
padding-top: ${({ theme }) => theme.space[2]}px;
padding-top: ${({ theme }) => theme.space[3]}px;
}
`

Expand Down Expand Up @@ -166,6 +167,7 @@ export const FooterContainer = styled(Box)`
position: sticky;
bottom: 0;
width: 100%;
padding-left: 4px;
@media (min-width: ${({ theme }) => theme.breakpoints[BREAK_POINT_COLUMNS]}) {
position: sticky;
Expand Down
5 changes: 3 additions & 2 deletions centrifuge-app/src/components/Menu/PageLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ const Root = styled(Text)<{ isActive?: boolean; stacked?: boolean }>`
${baseButton}
${primaryButton}
grid-template-columns: ${({ stacked, theme }) => (stacked ? '1fr' : `${theme.sizes.iconSmall}px 1fr`)};
color: ${({ isActive, theme }) =>
isActive ? theme.colors.textGold : theme.colors.textInverted}; /* Example styling */
color: ${({ isActive, theme }) => (isActive ? theme.colors.textGold : theme.colors.textInverted)};
font-size: 14px;
font-weight: 500;
background-color: transparent;
border-radius: 4px;
&:hover {
color: ${({ theme }) => theme.colors.textGold};
background-color: rgba(145, 150, 155, 0.13);
}
`

Expand Down
5 changes: 4 additions & 1 deletion centrifuge-app/src/components/Menu/Toggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ export const Toggle = styled(Text)<{ isActive?: boolean; stacked?: boolean }>`
grid-template-columns: ${({ stacked, theme }) =>
stacked ? '1fr' : `${theme.sizes.iconSmall}px 1fr ${theme.sizes.iconSmall}px`};
color: ${({ isActive, theme }) => (isActive ? theme.colors.textGold : theme.colors.textInverted)};
border-radius: 4px;
background-color: transparent;
&:hover {
color: ${({ isActive, theme }) => (isActive ? theme.colors.textGold : theme.colors.textInverted)};
color: ${({ theme }) => theme.colors.textGold};
background-color: rgba(145, 150, 155, 0.13);
}
`
2 changes: 1 addition & 1 deletion centrifuge-app/src/components/PoolCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export function PoolCard({
}
})
.reverse()
}, [calculateApy, getTinlakeMinInvestment])
}, [calculateApy, getTinlakeMinInvestment, isTinlakePool, metaData?.tranches, tinlakeObjKey, tranches])

return (
<RouterTextLink to={`${poolId}`} style={{ textDecoration: 'none' }}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const TrancheTokenCards = ({
),
},
]
}, [pool, poolId, isTinlakePool, daysSinceCreation])
}, [pool, poolId, isTinlakePool, daysSinceCreation, metadata])

const columns = useMemo(() => {
return columnConfig.map((col, index) => {
Expand Down
8 changes: 4 additions & 4 deletions centrifuge-app/src/components/Report/PoolReportPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ function PoolDetailReporting({ poolId, isReportingTab }: { poolId: string; isRep
const pool = usePool(poolId) as Pool
const contentWrapperRef = React.useRef<HTMLDivElement>(null)

if (!poolId || !pool) {
return <Spinner mt={2} />
}

// We want to scroll within the table and not the page,
// this way we can keep the filters on top of the page while scrolling on the table
React.useEffect(() => {
Expand All @@ -54,6 +50,10 @@ function PoolDetailReporting({ poolId, isReportingTab }: { poolId: string; isRep
}
}, [isReportingTab])

if (!poolId || !pool) {
return <Spinner mt={2} />
}

return (
<div ref={contentWrapperRef}>
<React.Suspense fallback={<Spinner mt={2} />}>
Expand Down

0 comments on commit 716c711

Please sign in to comment.