Skip to content

Commit

Permalink
fix: Create const for username's div max width
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien-Torrent authored and pyphilia committed Aug 10, 2021
1 parent 9834c46 commit 19376b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/common/SettingsHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { hooks, useMutation } from '../../config/queryClient';
import {
AUTHENTICATION_HOST,
USERNAME_MAX_LENGTH,
HEADER_USERNAME_MAX_WIDTH,
} from '../../config/constants';
import {
HEADER_USER_ID,
Expand All @@ -32,7 +33,7 @@ const useStyles = makeStyles((theme) => ({
},
username: {
margin: theme.spacing(0, 2),
maxWidth: 120,
maxWidth: HEADER_USERNAME_MAX_WIDTH,
},
}));

Expand Down
1 change: 1 addition & 0 deletions src/config/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ export const UPLOAD_METHOD =
export const ITEM_ICON_MAX_SIZE = 25;

export const USERNAME_MAX_LENGTH = 15;
export const HEADER_USERNAME_MAX_WIDTH = 120;

export const SHARE_ITEM_MODAL_MIN_WIDTH = 120;

Expand Down

0 comments on commit 19376b6

Please sign in to comment.