Turn off the accepted rules and fix the design tokens, alt text, and last type errors. [skip build]
This commit is contained in:
@@ -15,12 +15,12 @@ export interface AuthenticatedMediaProps extends Omit<ImgHTMLAttributes<HTMLImag
|
||||
* and renders them as blob URLs.
|
||||
*/
|
||||
export const AuthenticatedMedia = forwardRef<HTMLImageElement, AuthenticatedMediaProps>(
|
||||
({ src, useAuthentication: useAuthOverride, ...props }, ref) => {
|
||||
({ src, alt, useAuthentication: useAuthOverride, ...props }, ref) => {
|
||||
const useAuthFromServer = useMediaAuthentication();
|
||||
const useAuthentication = useAuthOverride ?? useAuthFromServer;
|
||||
const authenticatedSrc = useAuthenticatedMediaUrl(src, useAuthentication);
|
||||
|
||||
return <img ref={ref} {...props} src={authenticatedSrc} />;
|
||||
return <img ref={ref} alt={alt} {...props} src={authenticatedSrc} />;
|
||||
},
|
||||
);
|
||||
|
||||
@@ -33,11 +33,11 @@ AuthenticatedMedia.displayName = 'AuthenticatedMedia';
|
||||
export type AuthenticatedImgProps = ImgHTMLAttributes<HTMLImageElement>;
|
||||
|
||||
export const AuthenticatedImg = forwardRef<HTMLImageElement, AuthenticatedImgProps>(
|
||||
({ src, ...props }, ref) => {
|
||||
({ src, alt, ...props }, ref) => {
|
||||
const useAuthentication = useMediaAuthentication();
|
||||
const authenticatedSrc = useAuthenticatedMediaUrl(src, useAuthentication);
|
||||
|
||||
return <img ref={ref} {...props} src={authenticatedSrc} />;
|
||||
return <img ref={ref} alt={alt} {...props} src={authenticatedSrc} />;
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user