-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add FR faq entry #81
base: main
Are you sure you want to change the base?
Add FR faq entry #81
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice looks good, just dropped one comment! After that we're ready to go
import { | ||
AccordionContent, | ||
AccordionItem, | ||
AccordionTrigger | ||
} from "@/components/ui/accordion" | ||
import * as React from "react" | ||
|
||
export function FAQItem({ | ||
children, | ||
title | ||
}: { | ||
children: React.ReactNode | ||
title: string | ||
}) { | ||
return ( | ||
<AccordionItem value={title} className="border-none"> | ||
<AccordionTrigger className="mb-0 w-full rounded px-2 py-4 text-left font-normal transition hover:bg-slate-700 hover:no-underline"> | ||
<h3 className="text-xl">{title}</h3> | ||
</AccordionTrigger> | ||
<AccordionContent className="mt-0 p-2 pt-0 text-base text-stone-400"> | ||
{children} | ||
</AccordionContent> | ||
</AccordionItem> | ||
) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/components/ui/* is for highly reusable components, by nature an faq component isn't very reusable. It should be placed in app/student/recruitment/components/faq_item.tsx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason I placed it there is because it is also re used on the packages page. If I move this code to the student specific folder, I would have to create duplicate code in the company folder too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, I would probably create a new folder in that case, for example /components/shared. The reason I'm very picky about this is that if we do not make this distinction this folder will grow and become bloated quite quickly. The component should preferably be self contained too which isn't the case for this component since it relies on the component wrapping it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving as this is not blocking
On request from BRE, adding FAQ item to company packages page.
On request from Human Resources, adding FAQ to recruitment page. Made the FAQItem into a component as it is reused for both of these instances and may be reused in the future