fix(icons): properly import icons

This commit is contained in:
DecDuck
2024-12-24 10:39:13 +11:00
parent 31e8359ec0
commit 8945196633

View File

@ -89,7 +89,7 @@
Rating Rating
</td> </td>
<td <td
class="whitespace-nowrap flex flex-row items-center gap-x-1 px-3 py-4 text-sm text-zinc-400" class="whitespace-nowrap flex flex-row items-center gap-x-1 px-3 py-4 text-sm text-zinc-400"
> >
<StarIcon <StarIcon
v-for="value in ratingArray" v-for="value in ratingArray"
@ -98,7 +98,9 @@
'w-4 h-4', 'w-4 h-4',
]" ]"
/> />
<span class="text-zinc-600">({{ game.mReviewCount }} reviews)</span> <span class="text-zinc-600"
>({{ game.mReviewCount }} reviews)</span
>
</td> </td>
</tr> </tr>
</tbody> </tbody>
@ -161,10 +163,9 @@ import { PlusIcon } from "@heroicons/vue/20/solid";
import { ArrowTopRightOnSquareIcon } from "@heroicons/vue/24/outline"; import { ArrowTopRightOnSquareIcon } from "@heroicons/vue/24/outline";
import { StarIcon } from "@heroicons/vue/24/solid"; import { StarIcon } from "@heroicons/vue/24/solid";
import { Platform, type Game, type GameVersion } from "@prisma/client"; import { Platform, type Game, type GameVersion } from "@prisma/client";
import {micromark} from 'micromark'; import { micromark } from "micromark";
import moment from "moment"; import moment from "moment";
import LinuxLogo from "~/components/icons/LinuxLogo.vue"; import { IconsLinuxLogo, IconsWindowsLogo } from "#components";
import WindowsLogo from "~/components/icons/WindowsLogo.vue";
const route = useRoute(); const route = useRoute();
const gameId = route.params.id.toString(); const gameId = route.params.id.toString();
@ -206,8 +207,8 @@ const platforms = game.versions
.flat() .flat()
.filter((e, i, u) => u.indexOf(e) === i); .filter((e, i, u) => u.indexOf(e) === i);
const icons = { const icons = {
[Platform.Linux]: LinuxLogo, [Platform.Linux]: IconsLinuxLogo,
[Platform.Windows]: WindowsLogo, [Platform.Windows]: IconsWindowsLogo,
}; };
const rating = Math.round(game.mReviewRating * 5); const rating = Math.round(game.mReviewRating * 5);