-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fixed responsiveness issues on mobile view (#1133)
* fix: fixed reponsiveness issues on mobile view * test: updated tests * refactor: refactored code as requested
- Loading branch information
1 parent
c025310
commit c9b3fb9
Showing
7 changed files
with
250 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,27 @@ | ||
import React from 'react'; | ||
import { FormattedMessage } from '@edx/frontend-platform/i18n'; | ||
import { getConfig } from '@edx/frontend-platform'; | ||
import classNames from 'classnames'; | ||
import { useIsOnMobileScreen } from './data/hooks'; | ||
|
||
const UsernameDescription = () => ( | ||
<p className="text-gray-800 font-weight-normal m-0"> | ||
<FormattedMessage | ||
id="profile.username.description" | ||
defaultMessage="Your learner records information is only visible to you. Only your username is visible to others on {siteName}." | ||
description="A description of the username field" | ||
values={{ | ||
siteName: getConfig().SITE_NAME, | ||
}} | ||
/> | ||
</p> | ||
); | ||
const UsernameDescription = () => { | ||
const isMobileView = useIsOnMobileScreen(); | ||
return ( | ||
<p className={classNames([ | ||
'text-gray-800 font-weight-normal m-0', | ||
isMobileView ? 'h5' : 'p', | ||
])} | ||
> | ||
<FormattedMessage | ||
id="profile.username.description" | ||
defaultMessage="Your learner records information is only visible to you. Only your username is visible to others on {siteName}." | ||
description="A description of the username field" | ||
values={{ | ||
siteName: getConfig().SITE_NAME, | ||
}} | ||
/> | ||
</p> | ||
); | ||
}; | ||
|
||
export default UsernameDescription; |
Oops, something went wrong.