From 61987c6d26c56f24cd7135a05c96d34dded83e2d Mon Sep 17 00:00:00 2001
From: elijahladdie
Date: Sun, 17 Nov 2024 16:01:17 +0200
Subject: [PATCH] fixing community page theme
---
src/ProtectedRoute.tsx | 10 ++++++----
src/components/CommunityQuestions.tsx | 11 +++++------
src/queries/questions.query.tsx | 4 ++++
3 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/src/ProtectedRoute.tsx b/src/ProtectedRoute.tsx
index 6e99adaa8..19b795711 100644
--- a/src/ProtectedRoute.tsx
+++ b/src/ProtectedRoute.tsx
@@ -1,21 +1,23 @@
import React, { useContext } from 'react';
+import { useSearchParams } from 'react-router-dom';
import Notify from './components/Notify';
import { UserContext } from './hook/useAuth';
import checkOrgTokenExpiration from './utils/validateOrgToken';
-import { useSearchParams } from 'react-router-dom';
+
interface SomeType {
children: any;
}
// eslint-disable-next-line react/prop-types
export default function ProtectedRoutes(obj: SomeType) {
-
- const[searchParams]=useSearchParams()
+ const [searchParams] = useSearchParams();
const { user } = useContext(UserContext);
/* istanbul ignore next */
checkOrgTokenExpiration();
if (!user?.auth) {
- if(searchParams){sessionStorage.setItem("redirectParams",searchParams.toString())}
+ if (searchParams) {
+ sessionStorage.setItem('redirectParams', searchParams.toString());
+ }
return obj.children;
}
/* istanbul ignore next */
diff --git a/src/components/CommunityQuestions.tsx b/src/components/CommunityQuestions.tsx
index d555d88ca..9f623f70d 100644
--- a/src/components/CommunityQuestions.tsx
+++ b/src/components/CommunityQuestions.tsx
@@ -196,13 +196,13 @@ function CommunityQuestions() {
value={questionTitleText}
onChange={(e) => setQuestionTitleText(e.target.value)}
placeholder="Write question title..."
- className="p-2 border dark:bg-dark-tertiary border-gray-300 dark:border-gray-600 dark:text-black rounded w-full"
+ className="p-2 border dark:bg-dark-tertiary dark:text-white border-gray-300 dark:border-gray-600 rounded w-full"
/>
)}
- {/* Answer submission form for the logged-in user */}
{loggedUser && (