diff --git a/src/ProtectedRoute.tsx b/src/ProtectedRoute.tsx index 6e99adaa..19b79571 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 d555d88c..9f623f70 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" />