mirror of
https://github.com/rjNemo/devbook_ts
synced 2026-06-06 02:36:39 +00:00
* specify layout * create components folder and Navbar * create pages folder and Landing page component * create Sign Up page component * set basic routing - install react-router-dom - create Router folder and component * add constant routes file * verify all routes are accessible * add signin page * extract header component * add developers page * extract dev profiles * extract DevSummary type * update tests * add types * lay profile top and about out * lay experience section out - install moment - define Experience interface - define TimePeriod type & method * lay education section out - define education interface * lay repos section out * add Dashboard page and test * lay dashboard top section out * [refactor] Experience.ts: change employer to company; move TimePeriod to its own file * experience credential table in dashboard * education credential table in dashboard * dashboard done * edit profile * add experience page * add education page * create Comment and Post types; PostPage * postpage * posts page * refactor
47 lines
1.5 KiB
TypeScript
47 lines
1.5 KiB
TypeScript
import Comment from '../types/Comment';
|
|
|
|
/**
|
|
* Post send by a dev
|
|
*/
|
|
interface Post {
|
|
id: string;
|
|
userID: string;
|
|
name: string;
|
|
text: string;
|
|
picture: string;
|
|
likes: string[];
|
|
comments: Comment[];
|
|
// date: Date;
|
|
}
|
|
|
|
/**
|
|
* sample Post for development and tests
|
|
*/
|
|
export const dummyPost: Post = {
|
|
id: '12',
|
|
userID: '42',
|
|
picture:
|
|
'https://www.gravatar.com/avatar/205e460b479e2e5b48aec07710c08d50?s=200',
|
|
name: 'John Doe',
|
|
text:
|
|
'Lorem ipsum dolor sit amet consectetur adipisicing elit. Sint possimus corporis sunt necessitatibus! Minus nesciunt soluta suscipit nobis. Amet accusamus distinctio cupiditate blanditiis dolor? Illo perferendis eveniet cum cupiditate aliquam?',
|
|
comments: [
|
|
{
|
|
picture:
|
|
'https://www.gravatar.com/avatar/205e460b479e2e5b48aec07710c08d50?s=200',
|
|
name: 'John Doe',
|
|
text:
|
|
'Lorem ipsum dolor sit amet consectetur adipisicing elit. Sintpossimus corporis sunt necessitatibus! Minus nesciunt solutasuscipit nobis. Amet accusamus distinctio cupiditate blanditiis dolor? Illo perferendis eveniet cum cupiditate aliquam?',
|
|
},
|
|
{
|
|
picture:
|
|
'https://www.gravatar.com/avatar/205e460b479e2e5b48aec07710c08d50?s=200',
|
|
name: 'Ruidy Nemo',
|
|
text:
|
|
'Lorem ipsum dolor sit amet consectetur adipisicing elit. Sintpossimus corporis sunt necessitatibus! Minus nesciunt solutasuscipit nobis. Amet accusamus distinctio cupiditate blanditiis dolor? Illo perferendis eveniet cum cupiditate aliquam?',
|
|
},
|
|
],
|
|
likes: ['0', '42'],
|
|
};
|
|
|
|
export default Post;
|