From 3345b6f6c740823f393fcae73d58f180e1811a2e Mon Sep 17 00:00:00 2001 From: Imbus Date: Tue, 17 Oct 2023 03:05:38 +0200 Subject: [PATCH] Bad workarounds for getting tsc to compile --- client/src/Header.tsx | 4 ++-- client/src/Post.tsx | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/client/src/Header.tsx b/client/src/Header.tsx index f457ac3..88df0d9 100644 --- a/client/src/Header.tsx +++ b/client/src/Header.tsx @@ -16,8 +16,8 @@ function LoginDisplay({ sx }: { sx?: React.CSSProperties }): JSX.Element { if (loginCtx.currentUser == undefined) { loginCtx.setOpen?.(true); // If the loginCtx.setOpen is defined, call it with true as the argument } else { - loginCtx.setCurrentUser?.(undefined); - loginCtx.setUserToken?.(undefined); + loginCtx.setCurrentUser?.(""); + loginCtx.setUserToken?.(""); } } diff --git a/client/src/Post.tsx b/client/src/Post.tsx index f9f64d1..5930bc4 100644 --- a/client/src/Post.tsx +++ b/client/src/Post.tsx @@ -25,6 +25,7 @@ export function PostCard({ post }: { post: Post }): JSX.Element { upvotes: post.votes.up, downvotes: post.votes.down }); + setVoteCount; // To silence the linter, peak coding right here // Atrocious code const votePress = (vote: VoteDirection): void => {