refactor: lint formatting and fixes #6

Merged
me merged 10 commits from refactor/lint_fixes into main 2026-05-08 06:13:25 +00:00
4 changed files with 97 additions and 93 deletions
Showing only changes of commit 7fe67765d5 - Show all commits
@@ -122,7 +122,7 @@ export function ComposeCanvas({
// re-calculates height based on content and applies the zoom transform // re-calculates height based on content and applies the zoom transform
const syncViewport = useCallback(() => { const syncViewport = useCallback(() => {
if (!(fabricRef.current && wrapperRef.current)) return; if (!(fabricRef.current && wrapperRef.current)) return;
textboxRef.current.initDimensions(); textboxRef.current?.initDimensions();
const minHeight = initialData?.canvasHeight ?? DEFAULT_LOGICAL_HEIGHT; const minHeight = initialData?.canvasHeight ?? DEFAULT_LOGICAL_HEIGHT;
logicalSizeRef.current.height = measureLogicalContentHeight( logicalSizeRef.current.height = measureLogicalContentHeight(
@@ -63,7 +63,11 @@ export function PostSealModal({
type="button" type="button"
data-testid="view-letter-btn" data-testid="view-letter-btn"
className="btn btn-primary btn-sm" className="btn btn-primary btn-sm"
onClick={() => navigate(PATHS.read(sealedTargetId!))} onClick={() => {
if (sealedTargetId) {
navigate(PATHS.read(sealedTargetId));
}
}}
> >
View letter View letter
</button> </button>
+1 -1
View File
@@ -32,7 +32,7 @@ export const useAuth = () => {
const logout = async () => { const logout = async () => {
try { try {
await api.post(endpoints.LOGOUT); await api.post(endpoints.LOGOUT);
} catch (_error) { } catch {
} finally { } finally {
clearAuth(); clearAuth();
setMasterKey(null); setMasterKey(null);
+1 -1
View File
@@ -26,7 +26,7 @@ export default function Activate() {
}); });
await publicApi.get(url); await publicApi.get(url);
setStatus("success"); setStatus("success");
} catch (_err) { } catch {
setStatus("error"); setStatus("error");
} }
}; };