Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/components/articles/DisplayFAQs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ const DisplayFAQs: React.FC<DisplayFAQsProps> = ({ faqs }) => {

return (
<div className="space-y-4 rounded-lg bg-white-secondary p-6 shadow-md res-text-sm">
<h2 className="mb-4 font-bold text-gray-900 res-text-xl">Frequently Asked Questions</h2>
<h2 className="text-text-900 mb-4 font-bold res-text-xl">Frequently Asked Questions</h2>
{faqs.length === 0 && (
<p className="my-4 text-gray-700">No FAQs are added by the author yet.</p>
<p className="text-text-700 my-4">No FAQs are added by the author yet.</p>
)}
{faqs.map((faq, index) => (
<div
Expand All @@ -35,21 +35,21 @@ const DisplayFAQs: React.FC<DisplayFAQsProps> = ({ faqs }) => {
>
<div className="flex items-center justify-between">
<div className="flex items-center space-x-2">
<div className="font-semibold text-gray-900 res-text-base">Q{index + 1}:</div>
<p className="text-gray-700">{faq.question}</p>
<div className="text-text-900 font-semibold res-text-base">Q{index + 1}:</div>
<p className="text-text-700">{faq.question}</p>
</div>
{openIndex === index ? (
<ChevronUp className="text-gray-500" />
<ChevronUp className="text-text-500" />
) : (
<ChevronDown className="text-gray-500" />
<ChevronDown className="text-text-500" />
)}
</div>
</button>
{openIndex === index && (
<div className="px-4 pb-4">
<div className="flex items-start space-x-2 border-t border-gray-200 pt-2">
<div className="mt-0.5 font-medium text-gray-800 res-text-sm">A{index + 1}:</div>
<p className="text-gray-600">{faq.answer}</p>
<div className="text-text-800 mt-0.5 font-medium res-text-sm">A{index + 1}:</div>
<p className="text-text-600">{faq.answer}</p>
</div>
</div>
)}
Expand Down
3 changes: 1 addition & 2 deletions src/components/articles/SubmitArticleForm.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';


import {
Control,
Controller,
Expand Down Expand Up @@ -244,7 +243,7 @@ const SubmitArticleForm: React.FC<SubmitArticleFormProps> = ({
{showPrivateCheckOption && (
<div className="flex items-center gap-2">
<Checkbox
onCheckedChange={(checked) => onChange(checked ? 'Private' : 'Public')}
onCheckedChange={(checked: boolean) => onChange(checked ? 'Private' : 'Public')}
checked={value === 'Private'}
/>
<span className="text-sm text-text-secondary">
Expand Down
2 changes: 1 addition & 1 deletion src/components/posts/PostCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const PostCard = (post: PostOut) => {
height={36}
/>
<div className="flex items-center">
<h3 className="font-semibold text-gray-900 res-text-sm">{post.author.username}</h3>
<h3 className="font-semibold text-primary res-text-sm">{post.author.username}</h3>
<span className="mx-2 text-gray-400">&middot;</span>
<p className="text-gray-400">{dayjs(post?.created_at).fromNow()}</p>
</div>
Expand Down