Fix the single-violation style findings. [skip build]
This commit is contained in:
@@ -30,7 +30,7 @@ AuthenticatedMedia.displayName = 'AuthenticatedMedia';
|
||||
* A simpler authenticated img component for use in places like custom HTML parsers.
|
||||
* This component handles its own authentication state.
|
||||
*/
|
||||
export interface AuthenticatedImgProps extends ImgHTMLAttributes<HTMLImageElement> {}
|
||||
export type AuthenticatedImgProps = ImgHTMLAttributes<HTMLImageElement>;
|
||||
|
||||
export const AuthenticatedImg = forwardRef<HTMLImageElement, AuthenticatedImgProps>(
|
||||
({ src, ...props }, ref) => {
|
||||
|
||||
@@ -108,7 +108,6 @@ export const TikTokEmbedContainer = style([
|
||||
{
|
||||
width: '100%',
|
||||
height: toRem(550),
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
backgroundColor: '#000',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { createContext, useContext } from 'react';
|
||||
import React, { createContext, useContext, useMemo } from 'react';
|
||||
import { RectCords } from 'folds';
|
||||
|
||||
type ForumMessageMenuContextValue = {
|
||||
@@ -14,10 +14,10 @@ export function ForumMessageMenuProvider({
|
||||
openMenu: (anchor: RectCords) => void;
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
const value = useMemo(() => ({ openMenu }), [openMenu]);
|
||||
|
||||
return (
|
||||
<ForumMessageMenuContext.Provider value={{ openMenu }}>
|
||||
{children}
|
||||
</ForumMessageMenuContext.Provider>
|
||||
<ForumMessageMenuContext.Provider value={value}>{children}</ForumMessageMenuContext.Provider>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ const CROWN: SvgNode[] = [
|
||||
];
|
||||
|
||||
function lucideIcon(nodes: SvgNode): IconSrc {
|
||||
return function () {
|
||||
return function Icon() {
|
||||
return (
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
|
||||
@@ -111,6 +111,8 @@ export function DeveloperTools({ requestClose }: DeveloperToolsProps) {
|
||||
[mx],
|
||||
);
|
||||
|
||||
const closeProfileField = useCallback(() => setProfileFieldKey(undefined), []);
|
||||
|
||||
if (accountDataType !== undefined) {
|
||||
return (
|
||||
<AccountDataEditor
|
||||
@@ -122,8 +124,6 @@ export function DeveloperTools({ requestClose }: DeveloperToolsProps) {
|
||||
);
|
||||
}
|
||||
|
||||
const closeProfileField = useCallback(() => setProfileFieldKey(undefined), []);
|
||||
|
||||
return (
|
||||
<Page>
|
||||
<PageHeader outlined={false}>
|
||||
|
||||
@@ -92,13 +92,15 @@ export function useTypingVerbs(userIds: string[]): Record<string, string | undef
|
||||
let cancelled = false;
|
||||
const unsubscribe = registerProfileCacheListener(() => setTick((tick) => tick + 1));
|
||||
|
||||
// setProfileCache does not notify listeners, so a fresh fetch has to re-render here
|
||||
const rerender = () => {
|
||||
if (!cancelled) setTick((tick) => tick + 1);
|
||||
};
|
||||
|
||||
for (const userId of key.split(',')) {
|
||||
if (getCachedProfileFields(userId)) continue;
|
||||
// setProfileCache does not notify listeners, so a fresh fetch has to re-render here
|
||||
getProfileFields(mx, userId)
|
||||
.then(() => {
|
||||
if (!cancelled) setTick((tick) => tick + 1);
|
||||
})
|
||||
.then(rerender)
|
||||
.catch(() => undefined);
|
||||
}
|
||||
|
||||
|
||||
@@ -215,10 +215,11 @@ export function extractMetadataFromImage(imageData: ArrayBuffer | Uint8Array): I
|
||||
console.log('[extractMetadataFromImage] Detected format:', format);
|
||||
|
||||
switch (format) {
|
||||
case 'png':
|
||||
case 'png': {
|
||||
const pngMetadata = extractMetadataFromPNG(imageData);
|
||||
console.log('[extractMetadataFromImage] PNG metadata:', pngMetadata);
|
||||
return pngMetadata;
|
||||
}
|
||||
// For other formats, extract color only for now
|
||||
case 'webp':
|
||||
case 'jpeg':
|
||||
|
||||
Reference in New Issue
Block a user