fix: correct function signatures and remove redundant code
- DatabaseProvider.ts: Remove redundant normalizer check - Normalizer is applied by parent class, no need to apply twice - Fixes "Property 'normalizer' does not exist" error - image.ts: Separate type and value exports for proper type resolution - CharacterImageCell.svelte: Fix getCharacterImage parameter order - Changed (id, pose, variant) to (id, variant, pose) - SearchContent.svelte: Fix getCharacterImage parameter order Fixes ImageVariant type errors and property access errors. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
b54ac91638
commit
16e24e337b
4 changed files with 4 additions and 9 deletions
|
|
@ -12,7 +12,7 @@
|
|||
</script>
|
||||
|
||||
<div class="image-cell">
|
||||
<img src={getCharacterImage(row.granblueId, '01', 'square')} alt="" class="database-image" />
|
||||
<img src={getCharacterImage(row.granblueId, 'square', '01')} alt="" class="database-image" />
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@
|
|||
|
||||
switch (type) {
|
||||
case 'character':
|
||||
return getCharacterImage(id, '01', 'square')
|
||||
return getCharacterImage(id, 'square', '01')
|
||||
case 'weapon':
|
||||
return getWeaponImage(id, 'square')
|
||||
case 'summon':
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
// Re-export types and functions from the main image utility
|
||||
export {
|
||||
type ResourceType as ResourceKind,
|
||||
type ImageVariant,
|
||||
getPlaceholderImage as getPlaceholder,
|
||||
getCharacterImage,
|
||||
getWeaponImage,
|
||||
|
|
@ -9,6 +7,8 @@ export {
|
|||
getImageUrl as getImageUrlBase
|
||||
} from '$lib/utils/images'
|
||||
|
||||
export type { ResourceType as ResourceKind, ImageVariant } from '$lib/utils/images'
|
||||
|
||||
// Legacy compatibility wrapper
|
||||
interface ImageArgs {
|
||||
type: 'character' | 'weapon' | 'summon'
|
||||
|
|
|
|||
|
|
@ -80,11 +80,6 @@ export class DatabaseProvider extends RestDataProvider {
|
|||
}
|
||||
}
|
||||
|
||||
// Apply normalizer if defined
|
||||
if (this.normalizer && result.results) {
|
||||
return result.results.map(this.normalizer)
|
||||
}
|
||||
|
||||
return result.results || []
|
||||
} catch (error) {
|
||||
console.error('Failed to fetch data:', error)
|
||||
|
|
|
|||
Loading…
Reference in a new issue