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

fix: ui issue with scroll on a create plan page #81

Merged
merged 2 commits into from
Nov 18, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ export function CreateNewPlanPage({ planId }: { planId: string }) {
}) ?? [];

return (
<div className="flex w-full flex-1 flex-col items-center justify-center gap-2 py-3 md:flex-row md:items-start">
<div className="flex w-full max-w-[350px] flex-col items-center justify-center gap-2 px-2 md:ml-4 md:w-4/12 md:flex-col">
<div className="flex h-full w-full flex-col items-center justify-center gap-2 py-3 md:flex-row md:items-start">
<div className="flex h-full w-full max-w-[350px] flex-col items-center justify-center gap-2 px-2 md:ml-4 md:w-4/12 md:flex-col">
<div className="flex flex-col justify-start gap-3 md:w-full">
<div className="flex w-full items-end gap-2">
<div className="flex items-end gap-2">
Expand Down Expand Up @@ -206,29 +206,27 @@ export function CreateNewPlanPage({ planId }: { planId: string }) {
</div>
) : null}

<div className="w-full items-center justify-center">
<div className="w-full overflow-auto">
<Accordion type="single" collapsible={true}>
{plan.registrations.map((registration) => (
<GroupsAccordionItem
key={registration.id}
registrationName={registration.name}
onCourseCheck={(courseId) => {
plan.selectCourse(courseId);
}}
onDelete={() => {
plan.removeRegistration(registration.id);
}}
onCheckAll={(isChecked) => {
plan.checkAllCourses(registration.id, isChecked);
}}
courses={plan.courses.filter(
(c) => c.registrationId === registration.id,
)}
/>
))}
</Accordion>
</div>
<div className="flex w-full flex-1 flex-col overflow-y-scroll">
<Accordion type="single" collapsible={true}>
{plan.registrations.map((registration) => (
<GroupsAccordionItem
key={registration.id}
registrationName={registration.name}
onCourseCheck={(courseId) => {
plan.selectCourse(courseId);
}}
onDelete={() => {
plan.removeRegistration(registration.id);
}}
onCheckAll={(isChecked) => {
plan.checkAllCourses(registration.id, isChecked);
}}
courses={plan.courses.filter(
(c) => c.registrationId === registration.id,
)}
/>
))}
</Accordion>
</div>
</div>
<hr />
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/app/plans/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ export default function PlansLayout({
}) {
return (
<div className="flex h-screen min-h-screen flex-col items-center overflow-x-hidden">
<div className="flex max-h-20 min-h-20 w-full items-center justify-between bg-mainbutton7">
<div className="flex w-full items-center justify-between bg-mainbutton7 py-4 shadow-sm">
<div className="container mx-auto flex items-center justify-between">
<div className="ml-4 flex items-center gap-2 text-2xl font-bold text-white md:w-1/4">
<SolvroLogo />
<div className="md:hidden">Kreator</div>
</div>
<div className="hidden w-1/2 items-center justify-center font-bold text-white md:flex md:text-4xl">
<div className="hidden w-1/2 items-center justify-center font-bold text-white md:flex md:text-3xl">
Kreator
</div>
<div className="mr-4 flex w-1/4 items-center justify-end">
Expand Down
Loading