diff --git a/packages/common/src/models/Album.ts b/packages/common/src/models/Album.ts index ec9b470a..833ab907 100644 --- a/packages/common/src/models/Album.ts +++ b/packages/common/src/models/Album.ts @@ -23,7 +23,7 @@ import { Artist } from "./Artist"; import _ from "lodash"; @ObjectType() -@Table +@Table({ modelName: "Album" }) export class Album extends Model> { @Field((type) => Int) @PrimaryKey diff --git a/packages/common/src/models/Artist.ts b/packages/common/src/models/Artist.ts index bb880b9c..1b7c777d 100644 --- a/packages/common/src/models/Artist.ts +++ b/packages/common/src/models/Artist.ts @@ -30,7 +30,7 @@ import { GraphQLJSONObject } from "graphql-type-json"; import { SongInAlbum } from "./SongInAlbum"; @ObjectType() -@Table +@Table({ modelName: "Artist" }) export class Artist extends Model> { @Field(() => Int) @PrimaryKey diff --git a/packages/common/src/models/ArtistOfAlbum.ts b/packages/common/src/models/ArtistOfAlbum.ts index a34c08f1..36b41cc4 100644 --- a/packages/common/src/models/ArtistOfAlbum.ts +++ b/packages/common/src/models/ArtistOfAlbum.ts @@ -1,13 +1,24 @@ - import type { VDBArtistRoleType, VDBArtistCategoryType, ArtistForSongContract, - ArtistForAlbumForApiContract + ArtistForAlbumForApiContract, } from "../types/vocadb"; import { Artist } from "./Artist"; import { Album } from "./Album"; -import { Table, Column, PrimaryKey, AutoIncrement, Default, ForeignKey, BelongsTo, CreatedAt, UpdatedAt, DeletedAt, Model } from "sequelize-typescript"; +import { + Table, + Column, + PrimaryKey, + AutoIncrement, + Default, + ForeignKey, + BelongsTo, + CreatedAt, + UpdatedAt, + DeletedAt, + Model, +} from "sequelize-typescript"; import { SIMPLE_ENUM_ARRAY } from "../utils/sequelizeAdditions"; import { DataTypes } from "sequelize"; import { Field, Int, ObjectType } from "type-graphql"; @@ -29,7 +40,7 @@ const ROLES = [ "Mixer", "Chorus", "Encoder", - "VocalDataProvider" + "VocalDataProvider", ]; const CATEGORIES = [ "Nothing", @@ -41,52 +52,52 @@ const CATEGORIES = [ "Other", "Band", "Illustrator", - "Subject" + "Subject", ]; @ObjectType() -@Table +@Table({ modelName: "ArtistOfAlbum" }) export class ArtistOfAlbum extends Model { - @Field(type => Int) + @Field((type) => Int) @AutoIncrement @PrimaryKey - @Column({ type: new DataTypes.INTEGER }) + @Column({ type: new DataTypes.INTEGER() }) artistOfAlbumId: number; - @Field(type => [String]) + @Field((type) => [String]) // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore @Column({ - type: new SIMPLE_ENUM_ARRAY(ROLES) + type: new SIMPLE_ENUM_ARRAY(ROLES), }) roles: VDBArtistRoleType[]; - @Field(type => [String]) + @Field((type) => [String]) // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore @Column({ - type: new SIMPLE_ENUM_ARRAY(ROLES) + type: new SIMPLE_ENUM_ARRAY(ROLES), }) effectiveRoles: VDBArtistRoleType[]; - @Field(type => String) + @Field((type) => String) @Default("Nothing") @Column({ - type: DataTypes.ENUM(...CATEGORIES) + type: DataTypes.ENUM(...CATEGORIES), }) categories: VDBArtistCategoryType; - @BelongsTo(type => Album) + @BelongsTo((type) => Album) album: Album; - @ForeignKey(type => Album) + @ForeignKey((type) => Album) @Column albumId: number; - @BelongsTo(type => Artist) + @BelongsTo((type) => Artist) artist: Artist; - @ForeignKey(type => Artist) + @ForeignKey((type) => Artist) @Column artistId: number; @@ -97,7 +108,9 @@ export class ArtistOfAlbum extends Model { updatedOn: Date; /** Incomplete build. */ - static async artistFromVocaDB(entity: ArtistForAlbumForApiContract): Promise { + static async artistFromVocaDB( + entity: ArtistForAlbumForApiContract + ): Promise { const artist = await Artist.fromVocaDBArtistContract(entity.artist); const artistOfAlbumAttrs = { effectiveRoles: entity.effectiveRoles.split(", ") as VDBArtistRoleType[], diff --git a/packages/common/src/models/ArtistOfSong.ts b/packages/common/src/models/ArtistOfSong.ts index 5dab3a07..de5bc9f6 100644 --- a/packages/common/src/models/ArtistOfSong.ts +++ b/packages/common/src/models/ArtistOfSong.ts @@ -24,7 +24,7 @@ import { SIMPLE_ENUM_ARRAY_INVOCABLE } from "../utils/sequelizeAdditions"; import { Field, Int, ObjectType } from "type-graphql"; @ObjectType() -@Table +@Table({ modelName: "ArtistOfSong" }) export class ArtistOfSong extends Model { @Field((type) => Int) @AutoIncrement diff --git a/packages/common/src/models/Entry.ts b/packages/common/src/models/Entry.ts index 23c4da75..6e0e78b2 100644 --- a/packages/common/src/models/Entry.ts +++ b/packages/common/src/models/Entry.ts @@ -25,7 +25,7 @@ import { Pulse } from "./Pulse"; import { ObjectType, Field, ID } from "type-graphql"; @ObjectType({ description: "A Lyricova entry." }) -@Table +@Table({ modelName: "Entry" }) export class Entry extends Model { @Field() @AutoIncrement @@ -45,10 +45,7 @@ export class Entry extends Model { @Column({ type: new DataTypes.STRING(1024) }) vocalistsName: string; - @BelongsToMany( - () => Song, - () => SongOfEntry - ) + @BelongsToMany(() => Song, () => SongOfEntry) songs: Array; @Field() @@ -65,10 +62,7 @@ export class Entry extends Model { @Column({ type: "text" }) comment: string; - @BelongsToMany( - () => Tag, - () => TagOfEntry - ) + @BelongsToMany(() => Tag, () => TagOfEntry) tags: Array; @HasMany((type) => Verse) diff --git a/packages/common/src/models/FileInPlaylist.ts b/packages/common/src/models/FileInPlaylist.ts index 357801e1..2a7e6146 100644 --- a/packages/common/src/models/FileInPlaylist.ts +++ b/packages/common/src/models/FileInPlaylist.ts @@ -1,17 +1,25 @@ import { MusicFile } from "./MusicFile"; import { DataTypes } from "sequelize"; -import { Model, CreatedAt, UpdatedAt, Column, Table, PrimaryKey, ForeignKey, AutoIncrement } from "sequelize-typescript"; +import { + Model, + CreatedAt, + UpdatedAt, + Column, + Table, + PrimaryKey, + ForeignKey, + AutoIncrement, +} from "sequelize-typescript"; import { Playlist } from "./Playlist"; import { Field, Int, ObjectType } from "type-graphql"; @ObjectType() -@Table +@Table({ modelName: "FileInPlaylist" }) export class FileInPlaylist extends Model { - - @Field(type => Int) + @Field((type) => Int) @AutoIncrement @PrimaryKey - @Column({ type: new DataTypes.INTEGER }) + @Column({ type: new DataTypes.INTEGER() }) public id!: number; @ForeignKey(() => MusicFile) @@ -22,8 +30,8 @@ export class FileInPlaylist extends Model { @Column playlistId: number; - @Field(type => Int) - @Column({ type: new DataTypes.INTEGER, defaultValue: 0 }) + @Field((type) => Int) + @Column({ type: new DataTypes.INTEGER(), defaultValue: 0 }) sortOrder: number; @Field() @@ -33,5 +41,4 @@ export class FileInPlaylist extends Model { @Field() @UpdatedAt updatedOn: Date; - } diff --git a/packages/common/src/models/FuriganaMapping.ts b/packages/common/src/models/FuriganaMapping.ts index 74cff08b..80466ef6 100644 --- a/packages/common/src/models/FuriganaMapping.ts +++ b/packages/common/src/models/FuriganaMapping.ts @@ -8,7 +8,7 @@ import { import { Field, ObjectType } from "type-graphql"; @ObjectType() -@Table({ updatedAt: false, createdAt: false }) +@Table({ updatedAt: false, createdAt: false, modelName: "FuriganaMapping" }) export class FuriganaMapping extends Model { @Field() @Column({ type: new DataType.STRING(128), primaryKey: true }) diff --git a/packages/common/src/models/MusicFile.ts b/packages/common/src/models/MusicFile.ts index 2e99a80b..dcbfd195 100644 --- a/packages/common/src/models/MusicFile.ts +++ b/packages/common/src/models/MusicFile.ts @@ -50,7 +50,7 @@ const SONG_ID_TAG = "LyricovaSongID", export const ID3_LYRICS_LANGUAGE = "eng"; @ObjectType({ description: "A music file in the jukebox." }) -@Table +@Table({ modelName: "MusicFile" }) export class MusicFile extends Model> { @Field((type) => Int, { description: "File ID in database." }) @AutoIncrement diff --git a/packages/common/src/models/Playlist.ts b/packages/common/src/models/Playlist.ts index e836b74f..3d201ad2 100644 --- a/packages/common/src/models/Playlist.ts +++ b/packages/common/src/models/Playlist.ts @@ -1,13 +1,19 @@ import { MusicFile } from "./MusicFile"; -import { Table, Model, PrimaryKey, Column, BelongsToMany } from "sequelize-typescript"; +import { + Table, + Model, + PrimaryKey, + Column, + BelongsToMany, +} from "sequelize-typescript"; import { DataTypes } from "sequelize"; import { FileInPlaylist } from "./FileInPlaylist"; import { ObjectType, Field, ID } from "type-graphql"; @ObjectType({ description: "A playlist of music files." }) -@Table +@Table({ modelName: "Playlist" }) export class Playlist extends Model> { - @Field(type => ID, { description: "Slug of the playlist." }) + @Field((type) => ID, { description: "Slug of the playlist." }) @PrimaryKey @Column({ type: new DataTypes.STRING(512) }) slug: string; @@ -16,10 +22,7 @@ export class Playlist extends Model> { @Column({ type: new DataTypes.STRING(1024) }) name: string; - @BelongsToMany( - type => MusicFile, - intermediate => FileInPlaylist - ) + @BelongsToMany((type) => MusicFile, (intermediate) => FileInPlaylist) files: MusicFile[]; // virtual field in GraphQL diff --git a/packages/common/src/models/Pulse.ts b/packages/common/src/models/Pulse.ts index 72de86cb..63a7064d 100644 --- a/packages/common/src/models/Pulse.ts +++ b/packages/common/src/models/Pulse.ts @@ -13,7 +13,7 @@ import { Entry } from "./Entry"; import { Field, Int, ObjectType } from "type-graphql"; @ObjectType() -@Table({ updatedAt: false }) +@Table({ updatedAt: false, modelName: "Pulse" }) export class Pulse extends Model { @Field((type) => Int) @AutoIncrement diff --git a/packages/common/src/models/SiteMeta.ts b/packages/common/src/models/SiteMeta.ts index 38e5320a..af604077 100644 --- a/packages/common/src/models/SiteMeta.ts +++ b/packages/common/src/models/SiteMeta.ts @@ -1,8 +1,7 @@ import { Table, Model, Column, PrimaryKey } from "sequelize-typescript"; import { DataTypes } from "sequelize"; - -@Table +@Table({ modelName: "SiteMeta" }) export class SiteMeta extends Model { @PrimaryKey @Column({ type: new DataTypes.STRING(768) }) diff --git a/packages/common/src/models/Song.ts b/packages/common/src/models/Song.ts index 77f969eb..ea0b364c 100644 --- a/packages/common/src/models/Song.ts +++ b/packages/common/src/models/Song.ts @@ -28,7 +28,7 @@ import { GraphQLJSONObject } from "graphql-type-json"; import _ from "lodash"; @ObjectType() -@Table +@Table({ modelName: "Song" }) export class Song extends Model> { @Field(() => Int) @PrimaryKey diff --git a/packages/common/src/models/SongInAlbum.ts b/packages/common/src/models/SongInAlbum.ts index 224001fb..b42a60c5 100644 --- a/packages/common/src/models/SongInAlbum.ts +++ b/packages/common/src/models/SongInAlbum.ts @@ -23,7 +23,7 @@ import { DataTypes } from "sequelize"; import { Field, Int, ObjectType } from "type-graphql"; @ObjectType() -@Table +@Table({ modelName: "SongInAlbum" }) export class SongInAlbum extends Model { @AutoIncrement @PrimaryKey diff --git a/packages/common/src/models/SongOfEntry.ts b/packages/common/src/models/SongOfEntry.ts index 9ead0025..58f815d4 100644 --- a/packages/common/src/models/SongOfEntry.ts +++ b/packages/common/src/models/SongOfEntry.ts @@ -1,14 +1,23 @@ import { DataTypes } from "sequelize"; -import { Model, CreatedAt, UpdatedAt, DeletedAt, Column, Table, PrimaryKey, ForeignKey, AutoIncrement } from "sequelize-typescript"; +import { + Model, + CreatedAt, + UpdatedAt, + DeletedAt, + Column, + Table, + PrimaryKey, + ForeignKey, + AutoIncrement, +} from "sequelize-typescript"; import { Song } from "./Song"; import { Entry } from "./Entry"; -@Table +@Table({ modelName: "SongOfEntry" }) export class SongOfEntry extends Model { - @AutoIncrement @PrimaryKey - @Column({ type: new DataTypes.INTEGER }) + @Column({ type: new DataTypes.INTEGER() }) public id!: number; @ForeignKey(() => Song) @@ -24,5 +33,4 @@ export class SongOfEntry extends Model { @UpdatedAt updatedOn: Date; - } diff --git a/packages/common/src/models/Tag.ts b/packages/common/src/models/Tag.ts index 0cc996f1..1b1c4fa4 100644 --- a/packages/common/src/models/Tag.ts +++ b/packages/common/src/models/Tag.ts @@ -11,7 +11,7 @@ import { TagOfEntry } from "./TagOfEntry"; import { Field, ID, ObjectType } from "type-graphql"; @ObjectType() -@Table +@Table({ modelName: "Tag" }) export class Tag extends Model { @Field((type) => ID) @PrimaryKey @@ -26,9 +26,6 @@ export class Tag extends Model { @Column({ type: new DataTypes.STRING(16) }) color: string; - @BelongsToMany( - () => Entry, - () => TagOfEntry - ) + @BelongsToMany(() => Entry, () => TagOfEntry) entries: Entry[]; } diff --git a/packages/common/src/models/TagOfEntry.ts b/packages/common/src/models/TagOfEntry.ts index 8e12e85f..906a469b 100644 --- a/packages/common/src/models/TagOfEntry.ts +++ b/packages/common/src/models/TagOfEntry.ts @@ -15,7 +15,7 @@ import { Tag } from "./Tag"; import { Field, ID, ObjectType } from "type-graphql"; @ObjectType() -@Table +@Table({ modelName: "TagOfEntry" }) export class TagOfEntry extends Model { @Field((type) => ID) @AutoIncrement diff --git a/packages/common/src/models/User.ts b/packages/common/src/models/User.ts index 7c78ffa5..c4e92192 100644 --- a/packages/common/src/models/User.ts +++ b/packages/common/src/models/User.ts @@ -15,7 +15,7 @@ import crypto from "crypto"; import { ObjectType, Field, Int } from "type-graphql"; @ObjectType() -@Table +@Table({ modelName: "User" }) export class User extends Model { @Field((type) => Int) @AutoIncrement diff --git a/packages/common/src/models/UserPublicKeyCredential.ts b/packages/common/src/models/UserPublicKeyCredential.ts index f53d5fa2..b3fecbb3 100644 --- a/packages/common/src/models/UserPublicKeyCredential.ts +++ b/packages/common/src/models/UserPublicKeyCredential.ts @@ -15,7 +15,7 @@ import { User } from "./User"; import { ObjectType, Field, Int } from "type-graphql"; @ObjectType() -@Table +@Table({ modelName: "UserPublicKeyCredential" }) export class UserPublicKeyCredential extends Model { @Field() @AutoIncrement diff --git a/packages/common/src/models/Verse.ts b/packages/common/src/models/Verse.ts index 0f2c8649..a22c23c1 100644 --- a/packages/common/src/models/Verse.ts +++ b/packages/common/src/models/Verse.ts @@ -16,7 +16,7 @@ import { DataTypes } from "sequelize"; import { Field, ObjectType } from "type-graphql"; @ObjectType() -@Table +@Table({ modelName: "Verse" }) export class Verse extends Model { @Field() @AutoIncrement diff --git a/packages/common/src/models/VideoFile.ts b/packages/common/src/models/VideoFile.ts index 2485c584..dbd0e460 100644 --- a/packages/common/src/models/VideoFile.ts +++ b/packages/common/src/models/VideoFile.ts @@ -17,7 +17,7 @@ import { DataTypes } from "sequelize"; import { Field, Int, ObjectType } from "type-graphql"; @ObjectType() -@Table +@Table({ modelName: "VideoFile" }) export class VideoFile extends Model { @Field(() => Int) @AutoIncrement diff --git a/packages/lyricova/next.config.mjs b/packages/lyricova/next.config.mjs index c9443362..f9f15d5e 100644 --- a/packages/lyricova/next.config.mjs +++ b/packages/lyricova/next.config.mjs @@ -5,41 +5,42 @@ const withBundleAnalyzer = analyzer({ enabled: process.env.ANALYZE === "true", }); -export default withSuperjson()(withBundleAnalyzer({ - webpack: (config, options) => { - // config.resolve.alias.react = path.resolve(__dirname, "node_modules/react"); - return config; - }, - async redirects() { - return [ - { - source: "/pages/1", - destination: "/", - permanent: true, - }, - { - source: "/tags/:slug/pages/1", - destination: "/tags/:slug", - permanent: true, - }, - ]; - }, - modularizeImports: { - lodash: { - transform: "lodash/{{member}}" - }, - "@mui/material": { - transform: "@mui/material/{{member}}" +export default withSuperjson()( + withBundleAnalyzer({ + webpack: (config, options) => { + // config.resolve.alias.react = path.resolve(__dirname, "node_modules/react"); + return config; }, - "@mui/core": { - transform: "@mui/core/{{member}}" + async redirects() { + return [ + { + source: "/pages/1", + destination: "/", + permanent: true, + }, + { + source: "/tags/:slug/pages/1", + destination: "/tags/:slug", + permanent: true, + }, + ]; }, - "@mui/lab": { - transform: "@mui/lab/{{member}}" + modularizeImports: { + lodash: { + transform: "lodash/{{member}}", + }, + "@mui/material": { + transform: "@mui/material/{{member}}", + }, + "@mui/core": { + transform: "@mui/core/{{member}}", + }, + "@mui/lab": { + transform: "@mui/lab/{{member}}", + }, + "@mui/icons-material/?(((\\w*)?/?)*)": { + transform: "@mui/icons-material/{{ matches.[1] }}/{{member}}", + }, }, - "@mui/icons-material/?(((\\w*)?/?)*)": { - transform: "@mui/icons-material/{{ matches.[1] }}/{{member}}" - } - } -})); - + }) +); diff --git a/packages/lyricova/package-lock.json b/packages/lyricova/package-lock.json index bacc2fbd..359aae28 100644 --- a/packages/lyricova/package-lock.json +++ b/packages/lyricova/package-lock.json @@ -7382,6 +7382,66 @@ "version": "0.3.3", "resolved": "https://registry.npmjs.org/yoga-wasm-web/-/yoga-wasm-web-0.3.3.tgz", "integrity": "sha512-N+d4UJSJbt/R3wqY7Coqs5pcV0aUj2j9IaQ3rNj9bVCLld8tTGKRa2USARjnvZJWVx1NDmQev8EknoczaOQDOA==" + }, + "node_modules/@next/swc-android-arm-eabi": { + "version": "13.1.6", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.1.6.tgz", + "integrity": "sha512-F3/6Z8LH/pGlPzR1AcjPFxx35mPqjE5xZcf+IL+KgbW9tMkp7CYi1y7qKrEWU7W4AumxX/8OINnDQWLiwLasLQ==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-android-arm64": { + "version": "13.1.6", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-13.1.6.tgz", + "integrity": "sha512-cMwQjnB8vrYkWyK/H0Rf2c2pKIH4RGjpKUDvbjVAit6SbwPDpmaijLio0LWFV3/tOnY6kvzbL62lndVA0mkYpw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-freebsd-x64": { + "version": "13.1.6", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.1.6.tgz", + "integrity": "sha512-qaEALZeV7to6weSXk3Br80wtFQ7cFTpos/q+m9XVRFggu+8Ib895XhMWdJBzew6aaOcMvYR6KQ6JmHA2/eMzWw==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-arm-gnueabihf": { + "version": "13.1.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.1.6.tgz", + "integrity": "sha512-OybkbC58A1wJ+JrJSOjGDvZzrVEQA4sprJejGqMwiZyLqhr9Eo8FXF0y6HL+m1CPCpPhXEHz/2xKoYsl16kNqw==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } } }, "dependencies": { @@ -12592,6 +12652,30 @@ "version": "0.3.3", "resolved": "https://registry.npmjs.org/yoga-wasm-web/-/yoga-wasm-web-0.3.3.tgz", "integrity": "sha512-N+d4UJSJbt/R3wqY7Coqs5pcV0aUj2j9IaQ3rNj9bVCLld8tTGKRa2USARjnvZJWVx1NDmQev8EknoczaOQDOA==" + }, + "@next/swc-android-arm-eabi": { + "version": "13.1.6", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.1.6.tgz", + "integrity": "sha512-F3/6Z8LH/pGlPzR1AcjPFxx35mPqjE5xZcf+IL+KgbW9tMkp7CYi1y7qKrEWU7W4AumxX/8OINnDQWLiwLasLQ==", + "optional": true + }, + "@next/swc-android-arm64": { + "version": "13.1.6", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-13.1.6.tgz", + "integrity": "sha512-cMwQjnB8vrYkWyK/H0Rf2c2pKIH4RGjpKUDvbjVAit6SbwPDpmaijLio0LWFV3/tOnY6kvzbL62lndVA0mkYpw==", + "optional": true + }, + "@next/swc-freebsd-x64": { + "version": "13.1.6", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.1.6.tgz", + "integrity": "sha512-qaEALZeV7to6weSXk3Br80wtFQ7cFTpos/q+m9XVRFggu+8Ib895XhMWdJBzew6aaOcMvYR6KQ6JmHA2/eMzWw==", + "optional": true + }, + "@next/swc-linux-arm-gnueabihf": { + "version": "13.1.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.1.6.tgz", + "integrity": "sha512-OybkbC58A1wJ+JrJSOjGDvZzrVEQA4sprJejGqMwiZyLqhr9Eo8FXF0y6HL+m1CPCpPhXEHz/2xKoYsl16kNqw==", + "optional": true } } } diff --git a/packages/lyricova/src/components/public/listing/TopEntry.tsx b/packages/lyricova/src/components/public/listing/TopEntry.tsx index bf00dfc7..2f8bc4da 100644 --- a/packages/lyricova/src/components/public/listing/TopEntry.tsx +++ b/packages/lyricova/src/components/public/listing/TopEntry.tsx @@ -1,6 +1,6 @@ import type { Entry } from "lyricova-common/models/Entry"; import { buildAnimationSequence } from "lyricova-common/utils/typingSequence"; -import type { CSSProperties} from "react"; +import type { CSSProperties } from "react"; import { useCallback, useMemo, useRef } from "react"; import { PlainTextHangingPunct } from "../PlainTextHangingPunct"; import { TagRow } from "../TagRow"; @@ -101,7 +101,7 @@ export function TopEntry({ entry }: TopEntryProps) { style={ { "--tags-gradient": tagsGradient, - "--tags-foreground": entry.tags?.[0].color, + "--tags-foreground": entry.tags?.[0]?.color, } as CSSProperties } onMouseEnter={(evt) => {