Skip to content

Commit 2de6621

Browse files
committed
layout changes
1 parent 2b7da06 commit 2de6621

File tree

5 files changed

+13
-14
lines changed

5 files changed

+13
-14
lines changed

src/components/Layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default function Layout({
1515
return (
1616
<div className="mx-auto bg-gray-100 dark:bg-dark-800 min-h-screen">
1717
<Navbar />
18-
<div className="grid grid-cols-9 gap-10 mt-10 px-20 pt-10">
18+
<div className="grid grid-cols-9 gap-10 mt-10 px-60 pt-10">
1919
{sidebarContentLeft && (
2020
<aside className="col-span-2">{sidebarContentLeft}</aside>
2121
)}

src/components/UserDetails/Badges/Badge.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,27 @@ const Badge = ({ badge }: { badge: Badge_node$key }) => {
1717

1818
return (
1919
<div className="flex items-center ">
20-
<Hexagon size={60} color="red">
20+
<Hexagon size={36} color="red">
2121
<BadgeIcon displayName={data.displayName as LanguageName} />
2222
</Hexagon>
2323
<div className=" ml-8 dark:text-gray-300">
2424
<span className="font-bold block">Level: {data.currentLevel}</span>
25-
<span className="text-sm block">524 lines to next level</span>
25+
<span className="text-xs block">524 lines to next level</span>
2626
<div className="progress-bar">
2727
<style jsx>
2828
{`
2929
.progress-bar {
3030
position: relative;
3131
height: 10px;
32-
width: 120px;
32+
width: 100px;
3333
background-color: #ccc;
3434
border-radius: 5px;
3535
box-shadow: inset 0.3em 0.3em 1em rgba(0, 0, 0, 0.3);
3636
}
3737
.progress-bar:after {
3838
content: '';
3939
position: absolute;
40-
width: ${1.2 * data.progressPercentageToNextLevel}px;
40+
width: ${data.progressPercentageToNextLevel}px;
4141
height: inherit;
4242
background-color: red;
4343
border-radius: 5px;

src/components/UserDetails/Badges/BadgeIcon.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ type BadgeIconProps = {
3333

3434
export default function BadgeIcon({ displayName }: BadgeIconProps) {
3535
return (
36-
<div className="text-3xl z-10 badge-icon">
36+
<div className="text-xl z-10 badge-icon">
3737
{iconMap[displayName]}
3838
<style>
3939
{`

src/components/UserDetails/Bio.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const Bio = ({ user }: BioProps) => {
2929
}
3030
`
3131
)
32-
const onChange = (evt: any) => setBio(evt.target.textContent)
32+
const onChange = (evt: any) => setBio(evt.target.value)
3333
const onSubmit = () => {
3434
commitMutation({
3535
variables: {
@@ -39,14 +39,13 @@ const Bio = ({ user }: BioProps) => {
3939
}
4040

4141
return (
42-
<p
43-
contentEditable={true}
44-
onInput={onChange}
42+
<input
43+
onChange={onChange}
4544
onBlur={onSubmit}
4645
className="dark:text-gray-300"
47-
>
48-
{data.bio}
49-
</p>
46+
type="text"
47+
defaultValue={data.bio}
48+
/>
5049
)
5150
}
5251

src/components/UserDetails/UserDetails.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const UserDetails = ({ user }: Props) => {
3030

3131
return (
3232
<div className="flex flex-col items-center">
33-
<img className="rounded-md w-32" src={data.avatar} alt={data.handle} />
33+
<img className="rounded-md w-20" src={data.avatar} alt={data.handle} />
3434
<h1 className="dark:text-gray-400">@{data.handle}</h1>
3535
<Bio user={data} />
3636
<div className="my-4 flex space-x-4 dark:text-gray-400">

0 commit comments

Comments
 (0)