diff --git a/src/lib/components/PostCard.svelte b/src/lib/components/PostCard.svelte
index bd9ab80..5a48e3c 100644
--- a/src/lib/components/PostCard.svelte
+++ b/src/lib/components/PostCard.svelte
@@ -47,7 +47,7 @@
let contenido = $derived(() => {
let t = post.content.replaceAll('\n', '
');
t = t.replace(
- /#\w*/gm,
+ /#\p{L}*/u,
(match) =>
`${match}`
);
diff --git a/src/lib/hooks/obtenerCantidadDeUsosdeHtag.ts b/src/lib/hooks/obtenerCantidadDeUsosdeHtag.ts
new file mode 100644
index 0000000..1289737
--- /dev/null
+++ b/src/lib/hooks/obtenerCantidadDeUsosdeHtag.ts
@@ -0,0 +1,22 @@
+import { apiBase } from '@/stores/url';
+import { sesionStore } from '@/stores/usuario';
+import { get } from 'svelte/store';
+
+export async function obtenerCantidadDeUsosdeHtag(htag: string) {
+ if (!htag) return null;
+ try {
+ const req = await fetch(`${get(apiBase)}/api/posts/hashtag/${htag}`, {
+ method: 'GET',
+ headers: {
+ Authorization: `Bearer ${get(sesionStore)?.accessToken}`
+ }
+ });
+ if (req.ok) {
+ let data = await req.json();
+ return data;
+ }
+ return null;
+ } catch {
+ return null;
+ }
+}
diff --git a/src/routes/htag/[htag]/+page.svelte b/src/routes/htag/[htag]/+page.svelte
new file mode 100644
index 0000000..8ad1003
--- /dev/null
+++ b/src/routes/htag/[htag]/+page.svelte
@@ -0,0 +1,75 @@
+
+
+
El hashtag se ha utilizado {data.cantidad} veces
+