mirror of
https://github.com/balzack/databag.git
synced 2025-02-12 03:29:16 +00:00
setting default subject update string
This commit is contained in:
parent
2db3178510
commit
4b0ec4239e
@ -6,7 +6,7 @@ export function EditSubject({ state, actions }) {
|
|||||||
return (
|
return (
|
||||||
<EditSubjectWrapper>
|
<EditSubjectWrapper>
|
||||||
<Input placeholder="Subject (optional)" spellCheck="false" autocapitalize="word"
|
<Input placeholder="Subject (optional)" spellCheck="false" autocapitalize="word"
|
||||||
defaultValue={state.subject} onChange={(e) => actions.setSubjectUpdate(e.target.value)} />
|
value={state.subjectUpdate} onChange={(e) => actions.setSubjectUpdate(e.target.value)} />
|
||||||
</EditSubjectWrapper>
|
</EditSubjectWrapper>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ export function useDetails(cardId, channelId) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
let img, subject, host, started, contacts
|
let img, subject, subjectUpdate, host, started, contacts
|
||||||
let chan;
|
let chan;
|
||||||
if (cardId) {
|
if (cardId) {
|
||||||
const cardChan = card.state.cards.get(cardId);
|
const cardChan = card.state.cards.get(cardId);
|
||||||
@ -56,6 +56,7 @@ export function useDetails(cardId, channelId) {
|
|||||||
const parsed = JSON.parse(chan.data.channelDetail.data);
|
const parsed = JSON.parse(chan.data.channelDetail.data);
|
||||||
if (parsed.subject) {
|
if (parsed.subject) {
|
||||||
subject = parsed.subject;
|
subject = parsed.subject;
|
||||||
|
subjectUpdate = subject;
|
||||||
}
|
}
|
||||||
const date = new Date(chan.data.channelDetail.created * 1000);
|
const date = new Date(chan.data.channelDetail.created * 1000);
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
@ -88,7 +89,7 @@ export function useDetails(cardId, channelId) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
updateState({ img, subject, host, started, contacts, members, unknown });
|
updateState({ img, subject, host, started, contacts, members, unknown, subjectUpdate });
|
||||||
}, [cardId, channelId, card, channel]);
|
}, [cardId, channelId, card, channel]);
|
||||||
|
|
||||||
const actions = {
|
const actions = {
|
||||||
|
Loading…
Reference in New Issue
Block a user