Skip to content

Commit

Permalink
Feat: include fetchpriority option on main image
Browse files Browse the repository at this point in the history
  • Loading branch information
hookor authored and cuconveniencestore committed Aug 29, 2024
1 parent 0fd33b8 commit 1924198
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { AriaAttributes, DOMAttributes } from 'react';

declare module 'react' {
interface HTMLAttributes<T> extends AriaAttributes, DOMAttributes<T> {
fetchpriority?: 'high' | 'low' | 'auto';
}
}
1 change: 1 addition & 0 deletions src/components/home/TodayCaffeineText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const TodayCaffeineText = () => {
alt="coffee"
srcSet="/png/coffee_mainimg.webp 120w"
sizes="(min-width: 360px) 120px, (max-width: 500px) 120px"
fetchpriority="high"
/>
</div>
<AlertBubble
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
"src/**/*.tsx",
"src/**/*.js",
"src/**/*.d.ts",
"src/**/*.svg"
"src/**/*.svg",
"global.d.ts"
],
"exclude": ["node_modules"],
"references": [{ "path": "./tsconfig.node.json" }]
Expand Down

0 comments on commit 1924198

Please sign in to comment.