Revize 8b1106f4
Přidáno uživatelem Fantič před více než 1 rok
src/components/notes/NoteView.tsx | ||
---|---|---|
6 | 6 |
import React from "react"; |
7 | 7 |
import NotesListView from "./NotesListView"; |
8 | 8 | |
9 |
const NoteView = React.memo((props: { note: Note, handleReply: any, handleDelete: any, handleEdit: any, setConfirmDialog: any, navigation: any, parentId?: string }) => { |
|
9 |
const NoteView = React.memo((props: { note: Note, handleReply: any, handleDelete: any, handleEdit: any, setConfirmDialog: any, navigation: any, parentId?: string, higlighted?: boolean }) => {
|
|
10 | 10 |
const note = props.note; |
11 | 11 | |
12 | 12 |
const [isEdited, setIsEdited] = useState(false); |
... | ... | |
15 | 15 | |
16 | 16 |
const [text, setText] = useState(note.note); |
17 | 17 | |
18 |
console.log("rerender"); |
|
18 | 19 | |
19 | 20 |
const getDateString = (timestamp: Date): string => { |
20 | 21 |
return new Date(timestamp).toLocaleString("en-US", |
... | ... | |
82 | 83 |
} |
83 | 84 | |
84 | 85 |
return ( |
85 |
<HStack marginTop={5}> |
|
86 |
<HStack style={props.higlighted && {backgroundColor: "#FFF8E1",borderBottomColor: '#FFD54F', borderBottomWidth: 1.5, paddingBottom: 10}} marginTop={5}>
|
|
86 | 87 |
<Box width="10" height="10" marginTop="2"> |
87 | 88 |
<Avatar bg={note.noteColor} size="sm" source={{ |
88 | 89 |
uri: AVATAR_URL + "/" + note.avatarUrl |
Také k dispozici: Unified diff
#re 10797 NoteView: higlight replying to