mirror of
https://github.com/emailerfacu-spec/minix-front.git
synced 2026-04-01 13:10:44 -03:00
bug pagina de hashtags
This commit is contained in:
@@ -23,11 +23,10 @@
|
|||||||
|
|
||||||
let { data }: props = $props();
|
let { data }: props = $props();
|
||||||
|
|
||||||
let posts = $state(data.posts.response);
|
|
||||||
let postAModificar: Post | null = $state(null);
|
let postAModificar: Post | null = $state(null);
|
||||||
|
|
||||||
let postsfiltro = $derived(
|
let postsfiltro = $derived(
|
||||||
posts.filter((x) => {
|
data.posts.response.filter((x) => {
|
||||||
const regex = new RegExp(`#${data.htag}\\b`, 'gm');
|
const regex = new RegExp(`#${data.htag}\\b`, 'gm');
|
||||||
return regex.test(x.content);
|
return regex.test(x.content);
|
||||||
})
|
})
|
||||||
@@ -68,9 +67,11 @@
|
|||||||
<hr class="my-2" />
|
<hr class="my-2" />
|
||||||
|
|
||||||
<div class="mt-1 flex flex-col gap-3">
|
<div class="mt-1 flex flex-col gap-3">
|
||||||
{#each postsfiltro as post}
|
{#key data.posts.response}
|
||||||
<PostCard {post} bind:postAModificar />
|
{#each postsfiltro as post}
|
||||||
{/each}
|
<PostCard {post} bind:postAModificar />
|
||||||
|
{/each}
|
||||||
|
{/key}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user