-
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.
- Loading branch information
Showing
5 changed files
with
87 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,14 @@ | ||
'use client'; | ||
|
||
import Post from '@/components/timeline/Post'; | ||
import PrimaryColumn from '@/components/PrimaryColumn'; | ||
import Timeline from '@/components/timeline/Timeline'; | ||
|
||
export default function page() { | ||
return ( | ||
<main style={{ height: '2000px' }}> | ||
<Post | ||
displayName={'ククルス'} | ||
userName={'cuculus'} | ||
profileImageUrl={'/'} | ||
text={'あああああああああああああああああああ'} | ||
postId={1} | ||
postedAt={new Date()} | ||
replyCount={0} | ||
/> | ||
<main> | ||
<PrimaryColumn columnName={'ホーム'}> | ||
<Timeline /> | ||
</PrimaryColumn> | ||
</main> | ||
); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
'use client'; | ||
|
||
import { styled } from '@mui/material'; | ||
import { ReactNode } from 'react'; | ||
|
||
const Main = styled('div')` | ||
border-left: 1px solid ${({ theme }) => theme.palette.grey[100]}; | ||
border-right: 1px solid ${({ theme }) => theme.palette.grey[100]}; | ||
max-width: 640px; | ||
min-height: 100vh; | ||
`; | ||
|
||
const Header = styled('header')` | ||
top: 0; | ||
position: sticky; | ||
border-style: solid; | ||
border-color: ${({ theme }) => theme.palette.grey[100]}; | ||
border-width: 0; | ||
border-bottom-width: 1px; | ||
background-color: rgba(255, 255, 255, 0.6); | ||
color: ${({ theme }) => theme.palette.grey[800]}; | ||
z-index: ${({ theme }) => theme.zIndex.appBar}; | ||
`; | ||
|
||
type Props = { | ||
columnName: string; | ||
tabs?: string[]; | ||
children?: ReactNode; | ||
}; | ||
|
||
export default function PrimaryColumn({ columnName, children }: Props) { | ||
return ( | ||
<Main> | ||
<Header>{columnName}</Header> | ||
{children} | ||
</Main> | ||
); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { ReactNode } from 'react'; | ||
import Post from '@/components/timeline/Post'; | ||
|
||
/** | ||
* FIXME THIS IS MOCK | ||
* @constructor | ||
*/ | ||
export default function Timeline() { | ||
const posts: ReactNode[] = []; | ||
for (let i = 0; i < 100; i++) { | ||
posts.push( | ||
<Post | ||
displayName={'ククルス'} | ||
userName={'cuculus'} | ||
profileImageUrl={'/'} | ||
text={'あああああああああああああああああああ'} | ||
postId={1} | ||
postedAt={new Date()} | ||
replyCount={0} | ||
/>, | ||
); | ||
} | ||
return <div>{posts}</div>; | ||
} |