9c74f88b4a
* Add legend to free response graph * Hide answers panel unless resolving. Correctly order answers * No gray background for add answer & resolve panel. Tweak spacing * Max answer length 240 chars * Show answer text in resolution for market page, card instead of number. * Remove remaining answer #'s. Refactor outcome/resolution labels. * Move answer panel back up * Tweak spacing * Update placement of bet button on mobile for FR answer feed item * Fix reversed feed for binary markets * Show multi resolve options * Clean up unused parts of answer item * Lighten resolve buttons * Show answer text in market resolve email
34 lines
547 B
TypeScript
34 lines
547 B
TypeScript
import { User } from './user'
|
|
|
|
export type Answer = {
|
|
id: string
|
|
number: number
|
|
contractId: string
|
|
createdTime: number
|
|
|
|
userId: string
|
|
username: string
|
|
name: string
|
|
avatarUrl?: string
|
|
|
|
text: string
|
|
}
|
|
|
|
export const getNoneAnswer = (contractId: string, creator: User) => {
|
|
const { username, name, avatarUrl } = creator
|
|
|
|
return {
|
|
id: '0',
|
|
number: 0,
|
|
contractId,
|
|
createdTime: Date.now(),
|
|
userId: creator.id,
|
|
username,
|
|
name,
|
|
avatarUrl,
|
|
text: 'None',
|
|
}
|
|
}
|
|
|
|
export const MAX_ANSWER_LENGTH = 240
|