Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Add FR faq entry #81

wants to merge 3 commits into from

Conversation

AugustPaulsrud
Copy link
Contributor

@AugustPaulsrud AugustPaulsrud commented Sep 5, 2024

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

Copy link

vercel bot commented Sep 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
armada-nu ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 5, 2024 2:01pm

Copy link
Member

@hampfh hampfh left a 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

Comment on lines +1 to +25
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>
)
}
Copy link
Member

@hampfh hampfh Sep 5, 2024

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

Copy link
Contributor Author

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.

Copy link
Member

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

Copy link
Member

@hampfh hampfh left a 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants