mirror of
https://github.com/aljazceru/landscape-template.git
synced 2026-01-23 08:14:28 +01:00
92 lines
2.8 KiB
TypeScript
92 lines
2.8 KiB
TypeScript
|
||
import { Bounty, Question, Story } from "src/features/Posts/types";
|
||
import { getAvatarImage, getCoverImage } from "./utils";
|
||
|
||
const getAuthor = () => ({
|
||
id: 12,
|
||
name: "John Doe",
|
||
image: getAvatarImage()
|
||
})
|
||
|
||
const date = 'Mon Mar 14 2022 20:33:17 GMT+0200 (Eastern European Standard Time)'
|
||
|
||
let posts = {
|
||
stories: [
|
||
{
|
||
id: 1,
|
||
title: 'Digital Editor, Mars Review of Books',
|
||
cover_image: getCoverImage(),
|
||
comments_count: 31,
|
||
date,
|
||
votes_count: 120,
|
||
excerpt: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. In odio libero accumsan...',
|
||
type: "story",
|
||
tags: [
|
||
{ id: 1, title: "lnurl" },
|
||
{ id: 2, title: "webln" },
|
||
{ id: 3, title: "guide" },
|
||
],
|
||
author: getAuthor()
|
||
}
|
||
] as Story[],
|
||
bounties: [
|
||
{
|
||
type: "bounty",
|
||
id: 1,
|
||
title: 'Digital Editor, Mars Review of Books',
|
||
cover_image: getCoverImage(),
|
||
applicants_count: 31,
|
||
date,
|
||
votes_count: 120,
|
||
excerpt: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. In odio libero accumsan...',
|
||
tags: [
|
||
{ id: 1, title: "lnurl" },
|
||
{ id: 2, title: "webln" },
|
||
{ id: 3, title: "guide" },
|
||
],
|
||
author: getAuthor(),
|
||
deadline: "25 May",
|
||
reward_amount: 200_000,
|
||
}
|
||
] as Bounty[],
|
||
questions: [
|
||
{
|
||
type: "question",
|
||
id: 1,
|
||
title: 'Digital Editor, Mars Review of Books',
|
||
answers_count: 31,
|
||
date,
|
||
votes_count: 70,
|
||
excerpt: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. In odio libero accumsan...',
|
||
tags: [
|
||
{ id: 1, title: "lnurl" },
|
||
{ id: 2, title: "webln" },
|
||
],
|
||
author: getAuthor(),
|
||
comments: [
|
||
{
|
||
id: 1,
|
||
author: getAuthor(),
|
||
date,
|
||
body: 'Naw, I’m 42 and know people who started in their 50’s, you got this!'
|
||
},
|
||
{
|
||
id: 2,
|
||
author: getAuthor(),
|
||
date,
|
||
body: 'Naw, I’m 42 and know people who started in their 50’s, you got this!'
|
||
},
|
||
]
|
||
}
|
||
] as Question[]
|
||
}
|
||
|
||
|
||
posts.bounties = posts.bounties.map(b => ({ ...b, __typename: "Bounty" }))
|
||
posts.questions = posts.questions.map(b => ({ ...b, __typename: "Question" }))
|
||
posts.stories = posts.stories.map(b => ({ ...b, __typename: "Story" }))
|
||
|
||
|
||
export {
|
||
posts,
|
||
} |