refactor: clean up unused catch variables
This commit is contained in:
@@ -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>
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
@@ -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");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user