refactor: lint formatting and fixes #6
@@ -122,7 +122,7 @@ export function ComposeCanvas({
|
||||
// re-calculates height based on content and applies the zoom transform
|
||||
const syncViewport = useCallback(() => {
|
||||
if (!(fabricRef.current && wrapperRef.current)) return;
|
||||
textboxRef.current.initDimensions();
|
||||
textboxRef.current?.initDimensions();
|
||||
|
||||
const minHeight = initialData?.canvasHeight ?? DEFAULT_LOGICAL_HEIGHT;
|
||||
logicalSizeRef.current.height = measureLogicalContentHeight(
|
||||
|
||||
@@ -63,7 +63,11 @@ export function PostSealModal({
|
||||
type="button"
|
||||
data-testid="view-letter-btn"
|
||||
className="btn btn-primary btn-sm"
|
||||
onClick={() => navigate(PATHS.read(sealedTargetId!))}
|
||||
onClick={() => {
|
||||
if (sealedTargetId) {
|
||||
navigate(PATHS.read(sealedTargetId));
|
||||
}
|
||||
}}
|
||||
>
|
||||
View letter
|
||||
</button>
|
||||
|
||||
@@ -32,7 +32,7 @@ export const useAuth = () => {
|
||||
const logout = async () => {
|
||||
try {
|
||||
await api.post(endpoints.LOGOUT);
|
||||
} catch (_error) {
|
||||
} catch {
|
||||
} finally {
|
||||
clearAuth();
|
||||
setMasterKey(null);
|
||||
|
||||
@@ -26,7 +26,7 @@ export default function Activate() {
|
||||
});
|
||||
await publicApi.get(url);
|
||||
setStatus("success");
|
||||
} catch (_err) {
|
||||
} catch {
|
||||
setStatus("error");
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user