Skip to content

Commit

Permalink
remove alt from avatar; it causes issues and it doesnt provide any be…
Browse files Browse the repository at this point in the history
…nefit
  • Loading branch information
pablof7z committed Aug 12, 2023
1 parent c1cb1b5 commit e0653c3
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 15 deletions.
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.DS_Store
node_modules
/build
/dist
/.svelte-kit
/package
**/build
**/dist
**/.svelte-kit
**/package
.env
.env.*
!.env.example
Expand Down
19 changes: 12 additions & 7 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
{
"useTabs": false,
"singleQuote": false,
"trailingComma": "all",
"printWidth": 100,
"tabWidth": 4,
"plugins": ["prettier-plugin-svelte"],
"plugins": [
"@trivago/prettier-plugin-sort-imports",
"prettier-plugin-svelte"
],
"overrides": [
{
"files": "*.svelte",
"options": {
"parser": "svelte"
}
}
]
],
"importOrder": ["^[./]"],
"tabWidth": 4,
"useTabs": false,
"trailingComma": "es5",
"printWidth": 100,
"singleQuote": false,
"semi": true
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
"type": "module",
"dependencies": {
"@nostr-dev-kit/ndk": "^0.8.7",
"@trivago/prettier-plugin-sort-imports": "^4.2.0",
"classnames": "^2.3.2",
"hurdak": "github:ConsignCloud/hurdak",
"isomorphic-dompurify": "^1.8.0",
Expand Down
8 changes: 4 additions & 4 deletions src/lib/user/Avatar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,20 @@

{#await user?.fetchProfile()}
<img
alt="Loading avatar for {npub}"
alt=""
class="avatar avatar--loading {$$props.class}"
style={$$props.style}
/>
{:then value}
<img
src={user?.profile?.image ?? 'https://placehold.co/400/ccc/ccc/webp'}
alt="Avatar for {npub}"
src={user?.profile?.image??"https://placehold.co/400/ccc/ccc/webp"}
alt=""
class="avatar avatar--image {$$props.class}"
style={$$props.style}
/>
{:catch error}
<img
alt="Error loading avatar for {npub}"
alt=""
class="avatar avatar--error {$$props.class}"
style={$$props.style}
/>
Expand Down

0 comments on commit e0653c3

Please sign in to comment.