-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #121 from cuculus-dev/feature/issues-120
プロフィール編集画面
- Loading branch information
Showing
17 changed files
with
675 additions
and
175 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
78 changes: 8 additions & 70 deletions
78
src/app/(menu)/(public)/[username]/_components/elements/FollowButton.tsx
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
17 changes: 17 additions & 0 deletions
17
src/app/(menu)/(public)/[username]/_components/elements/HeaderImage.tsx
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
'use client'; | ||
|
||
import { styled } from '@mui/material'; | ||
|
||
const HeaderImage = styled('div')<{ | ||
image?: string; | ||
}>` | ||
display: block; | ||
background-size: cover; | ||
background-repeat: no-repeat; | ||
background-position: center; | ||
aspect-ratio: 3 / 1; | ||
background-color: ${({ theme }) => theme.palette.primary.light}; | ||
background-image: ${({ image }) => (image ? `url(${image})` : 'none')}; | ||
`; | ||
|
||
export default HeaderImage; |
20 changes: 20 additions & 0 deletions
20
src/app/(menu)/(public)/[username]/_components/elements/UserIcon.tsx
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
'use client'; | ||
|
||
import { Avatar, styled } from '@mui/material'; | ||
|
||
const UserIcon = styled(Avatar)` | ||
width: 120px; | ||
height: 120px; | ||
margin-top: -80px; | ||
border-color: ${({ theme }) => theme.palette.background.paper}; | ||
border-style: solid; | ||
${({ theme }) => theme.breakpoints.down('tablet')} { | ||
width: 92px; | ||
height: 92px; | ||
margin-top: -61px; | ||
} | ||
`; | ||
|
||
export default UserIcon; |
38 changes: 38 additions & 0 deletions
38
src/app/(menu)/(public)/[username]/_components/layouts/EditProfileButton.tsx
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
'use client'; | ||
|
||
import CapsuleButton from '@/app/_components/button/CapsuleButton'; | ||
import ProfileSettingModal from '@/app/(menu)/(public)/[username]/_components/layouts/ProfileSettingModal'; | ||
import { useState } from 'react'; | ||
import { useProfile } from '@/swr/client/auth'; | ||
|
||
export function EditProfileButton() { | ||
const text = 'プロフィールを編集'; | ||
const [open, setOpen] = useState<boolean>(false); | ||
const { data } = useProfile(); | ||
|
||
if (!data) { | ||
return <></>; | ||
} | ||
|
||
return ( | ||
<> | ||
<CapsuleButton | ||
aria-label={text} | ||
color="primary" | ||
onClick={() => { | ||
setOpen(true); | ||
}} | ||
variant="outlined" | ||
> | ||
{text} | ||
</CapsuleButton> | ||
<ProfileSettingModal | ||
open={open} | ||
bio={data.bio} | ||
displayName={data.name} | ||
src={data.profileImageUrl} | ||
onClose={() => setOpen(false)} | ||
/> | ||
</> | ||
); | ||
} |
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
Oops, something went wrong.