Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: responsiveness #17

Merged
merged 5 commits into from
Aug 12, 2024
Merged

feat: responsiveness #17

merged 5 commits into from
Aug 12, 2024

Conversation

0xtiti
Copy link
Collaborator

@0xtiti 0xtiti commented Aug 9, 2024

No description provided.

Copy link

vercel bot commented Aug 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
z-kchain-hub-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 12, 2024 9:16pm

@0xtiti 0xtiti changed the title feat: responsive footer | graph | layout feat: responsiveness Aug 9, 2024
@0xtiti 0xtiti marked this pull request as ready for review August 9, 2024 20:52
Comment on lines 30 to 36
display: isMobile ? 'grid' : 'flex',
gridTemplateColumns: isMobile ? 'auto 1fr' : 'none',
alignItems: 'center',
alignSelf: 'flex-start',
gap: currentTheme.gap,
justifyContent: isMobile ? 'start' : 'center',
textAlign: isMobile ? 'left' : 'center',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think adding mediaQueries would be better. wdyt?

fontWeight: 700,
lineHeight: '4rem',
letterSpacing: '-0.03em',
gridColumn: isMobile ? 'span 2' : 'auto',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idem

Comment on lines 119 to 123
display: isMobile ? 'grid' : 'flex',
alignItems: 'center',
justifyContent: isMobile ? 'space-between' : 'flex-start',
gap: currentTheme.gap,
gridTemplateColumns: isMobile ? 'repeat(2, 1fr)' : 'none',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idem

Comment on lines 54 to 69
return isMobile ? (
<MobileHeader
theme={theme}
goToHome={goToHome}
handleChangeLanguage={handleChangeLanguage}
localesMap={localesMap}
changeTheme={changeTheme}
/>
) : (
<DesktopHeader
theme={theme}
goToHome={goToHome}
handleChangeLanguage={handleChangeLanguage}
localesMap={localesMap}
changeTheme={changeTheme}
/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would recommend using a binary conditional (&&)

return {
display: 'flex',
flexDirection: 'column',
padding: isMobile ? '0 1rem' : '0 7rem',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idem

Comment on lines 11 to +14
export const TotalValueLocked = ({ tvl }: TotalValueLockedProps) => {
const theme = useTheme();
const isMobile = useMediaQuery(theme.breakpoints.down('sm'));

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be nice if we can split these components into different files in another pr

@0xtiti 0xtiti merged commit 3952f80 into dev Aug 12, 2024
6 checks passed
@0xtiti 0xtiti deleted the feat/responsiveness branch August 12, 2024 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants