Skip to content

Commit

Permalink
fixed navbar issue
Browse files Browse the repository at this point in the history
  • Loading branch information
hereisSwapnil committed Aug 31, 2024
1 parent f4e58fd commit 019a0f4
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 65 deletions.
126 changes: 62 additions & 64 deletions client/src/components/QuestionPage/AnswerPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ const AnswerPage = () => {

// After successful upload


navigate("/");
} catch (error) {
console.log(error);
Expand All @@ -53,72 +52,71 @@ const AnswerPage = () => {

return (
<>
<Navbar />
<div className="flex items-center justify-center">
<div className="mx-auto w-full max-w-[550px] bg-white">
<form
className="py-6 px-9"
onSubmit={handleSubmit((data) => {
answerQuestion(data);
})}
>
<div className="mb-5">
<label
htmlFor="title"
className="mb-3 block text-base font-small text-[#07074D]"
>
Question
</label>
{errors.title && (
<p
className="text-sm text-red-500 mt-1"
dangerouslySetInnerHTML={{
__html: errors.title.message,
}}
></p>
)}
</div>
<div className="flex items-center justify-center">
<div className="mx-auto w-full max-w-[550px] bg-white">
<form
className="py-6 px-9"
onSubmit={handleSubmit((data) => {
answerQuestion(data);
})}
>
<div className="mb-5">
<label
htmlFor="title"
className="mb-3 block text-base font-small text-[#07074D]"
>
Question
</label>
{errors.title && (
<p
className="text-sm text-red-500 mt-1"
dangerouslySetInnerHTML={{
__html: errors.title.message,
}}
></p>
)}
</div>

<div className="mb-5">
<label
htmlFor="description"
className="mb-3 block text-base font-small text-[#07074D]"
>
Write your Answer
</label>
<textarea
type="text"
name="description"
id="description"
placeholder="answer of the question is...."
rows={10}
className="w-full rounded-md border border-[#e0e0e0] bg-white py-3 px-6 text-base font-small text-[#6B7280] outline-none focus:border-[#6A64F1] focus:shadow-md"
{...register("description", {
required: "Description is required.",
maxLength: {
value: 250,
message: "Description should not exceed 250 characters.",
},
})}
/>
{errors.description && (
<p
className="text-sm text-red-500 mt-1"
dangerouslySetInnerHTML={{
__html: errors.description.message,
}}
></p>
)}
</div>
<div className="mb-5">
<label
htmlFor="description"
className="mb-3 block text-base font-small text-[#07074D]"
>
Write your Answer
</label>
<textarea
type="text"
name="description"
id="description"
placeholder="answer of the question is...."
rows={10}
className="w-full rounded-md border border-[#e0e0e0] bg-white py-3 px-6 text-base font-small text-[#6B7280] outline-none focus:border-[#6A64F1] focus:shadow-md"
{...register("description", {
required: "Description is required.",
maxLength: {
value: 250,
message: "Description should not exceed 250 characters.",
},
})}
/>
{errors.description && (
<p
className="text-sm text-red-500 mt-1"
dangerouslySetInnerHTML={{
__html: errors.description.message,
}}
></p>
)}
</div>

<div>
<button className="hover:shadow-form w-full rounded-md bg-[#6A64F1] py-3 px-8 text-center text-base font-semibold text-white outline-none">
Submit your Answer
</button>
</div>
</form>
</div>
<div>
<button className="hover:shadow-form w-full rounded-md bg-[#6A64F1] py-3 px-8 text-center text-base font-semibold text-white outline-none">
Submit your Answer
</button>
</div>
</form>
</div>
</div>
</>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ const QuestionNotifcation = () => {

return (
<>
<Navbar />
<main className="max-w-screen-sm mx-auto m-2 p-4">
<h1 className="text-2xl font-semibold">Questions...</h1>
<div className="mt-4">
Expand Down

1 comment on commit 019a0f4

@vercel
Copy link

@vercel vercel bot commented on 019a0f4 Aug 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.