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

プロフィール編集画面 #121

Merged
merged 21 commits into from
Dec 14, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
コンポーネント分割
takecchi committed Dec 13, 2023
commit 1d98fd5b87170bcb840d098640a60f3f43742cdc
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;
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: 80px;
height: 80px;
margin-top: -48px;
}
`;

export default UserIcon;
Original file line number Diff line number Diff line change
@@ -1,31 +1,21 @@
'use client';

import { Avatar, Box, Typography, styled } from '@mui/material';
import { Box, Typography, styled } from '@mui/material';
import {
FollowButton,
FollowStatus,
} from '@/app/(menu)/(public)/[username]/_components/elements/FollowButton';
import UserCount from '@/app/(menu)/(public)/[username]/_components/elements/UserCount';
import { usePathname } from 'next/navigation';
import HeaderImage from '@/app/(menu)/(public)/[username]/_components/elements/HeaderImage';
import UserIcon from '@/app/(menu)/(public)/[username]/_components/elements/UserIcon';

const UnselectableCard = styled('div')`
border-bottom: 1px solid ${({ theme }) => theme.palette.grey[100]};
background-color: ${({ theme }) => theme.palette.background.paper};
color: rgba(0, 0, 0, 0.87);
`;

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')};
`;

const Flex = styled(Box)`
display: flex;
flex-wrap: nowrap;
@@ -43,21 +33,6 @@ const FillFlex = styled(Box)`
flex-grow: 1;
`;

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: 80px;
height: 80px;
margin-top: -48px;
}
`;

const DisplayName = styled(Typography)`
word-wrap: break-word;
font-weight: bold;