mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-05-04 05:19:12 -04:00
Favorite Button Not working on a tool #1365
This commit is contained in:
parent
c7b80fbc78
commit
26d78d00e5
1 changed files with 10 additions and 1 deletions
|
@ -28,6 +28,15 @@ const { t } = useI18n();
|
||||||
const i18nKey = computed<string>(() => route.path.trim().replace('/', ''));
|
const i18nKey = computed<string>(() => route.path.trim().replace('/', ''));
|
||||||
const toolTitle = computed<string>(() => t(`tools.${i18nKey.value}.title`, String(route.meta.name)));
|
const toolTitle = computed<string>(() => t(`tools.${i18nKey.value}.title`, String(route.meta.name)));
|
||||||
const toolDescription = computed<string>(() => t(`tools.${i18nKey.value}.description`, String(route.meta.description)));
|
const toolDescription = computed<string>(() => t(`tools.${i18nKey.value}.description`, String(route.meta.description)));
|
||||||
|
|
||||||
|
const tool = computed<Tool>(() => ({
|
||||||
|
name: route.meta.name,
|
||||||
|
path: route.path,
|
||||||
|
description: route.meta.description,
|
||||||
|
icon: route.meta.icon,
|
||||||
|
isNew: route.meta.isNew,
|
||||||
|
category: route.meta.category,
|
||||||
|
}));
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -40,7 +49,7 @@ const toolDescription = computed<string>(() => t(`tools.${i18nKey.value}.descrip
|
||||||
</n-h1>
|
</n-h1>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<FavoriteButton :tool="{ name: route.meta.name } as Tool" />
|
<FavoriteButton :tool="tool" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue