feat: move all email to defer queue #185
fix: use relative part for defer func #185 chore: move sendEmail into defer fix: remove anon function to defer #185 feat: implement batch email sending with defer.run #185 chore: debug sendEmails #185 chore: add robots.txt chore: use promise.all in sendEmails chore: debug defer sendEmails #185 chore: try defer sendEmail without loop #105 chore: comment code chore: change loop style #185 chore: use promise.all for vercel edge #185 feat: add await to sendEmailNotification #185 chore: use sendEmails #185 fix: debug sendEmails #185 fix: email not updating in LMS fix: remove early return in sendEmails #185
This commit is contained in:
@@ -67,12 +67,7 @@
|
||||
id: createdFeed.id,
|
||||
content: newPost,
|
||||
author: {
|
||||
profile: {
|
||||
id: author.id,
|
||||
username: author.username,
|
||||
fullname: author.fullname,
|
||||
avatar_url: author.avatar
|
||||
}
|
||||
profile: { ...author }
|
||||
},
|
||||
created_at: createdFeed.created_at,
|
||||
comment: [],
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
import { onMount } from 'svelte';
|
||||
|
||||
export let feed: Feed;
|
||||
export let editFeed: Feed | any = {};
|
||||
export let author: Author | any = {};
|
||||
export let editFeed: Feed;
|
||||
export let author: Author;
|
||||
export let edit = false;
|
||||
export let deleteFeed = (arg: string) => {};
|
||||
export let deleteComment = (arg: string) => {};
|
||||
@@ -70,6 +70,14 @@
|
||||
deleteComment(id);
|
||||
};
|
||||
|
||||
const getClassIfSelectedByAuthor = (reactionType) => {
|
||||
const usersReacted = feed.reaction[reactionType] || [];
|
||||
|
||||
return usersReacted.includes(author.id)
|
||||
? 'bg-primary-200 border-primary-600 pl-2'
|
||||
: 'bg-gray-200 border-gray-600 pl-2';
|
||||
};
|
||||
|
||||
onMount(() => {
|
||||
if (isActive) {
|
||||
const el = document.getElementById(feed.id);
|
||||
@@ -94,13 +102,13 @@
|
||||
<span class="flex items-center gap-3">
|
||||
<div class="w-9 h-9">
|
||||
<img
|
||||
src={feed.author?.profile.avatar_url}
|
||||
src={feed.author?.profile?.avatar_url}
|
||||
alt="users banner"
|
||||
class="w-full h-full rounded-full object-cover"
|
||||
/>
|
||||
</div>
|
||||
<span>
|
||||
<p class="text-base font-semibold capitalize">{feed.author?.profile.fullname}</p>
|
||||
<p class="text-base font-semibold capitalize">{feed.author?.profile?.fullname}</p>
|
||||
<p class="text-sm font-medium text-gray-600">{calDateDiff(feed.created_at)}</p>
|
||||
</span>
|
||||
</span>
|
||||
@@ -134,7 +142,7 @@
|
||||
on:click={() => handleAddNewReaction(reactionType)}
|
||||
class={`flex transition ${
|
||||
feed.reaction[reactionType].length >= 1 &&
|
||||
'bg-primary-200 dark:bg-gray-900 dark:text-black px-1 border border-primary-600 rounded-full'
|
||||
`${getClassIfSelectedByAuthor(reactionType)} dark:text-black border rounded-full`
|
||||
}`}
|
||||
>
|
||||
<div class="text-[15px]">{reactions[reactionType]}</div>
|
||||
@@ -197,7 +205,7 @@
|
||||
<div class="flex items-center justify-between gap-2">
|
||||
<div class="w-7 h-7">
|
||||
<img
|
||||
src={author.avatar}
|
||||
src={author.avatar_url}
|
||||
alt="users banner"
|
||||
class="w-full h-full rounded-full object-cover"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user