Skip to content

Commit

Permalink
Bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
atrincas committed Nov 20, 2024
1 parent 3e27f94 commit 2e9e7d2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion client/src/components/ui/scroll-area.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const ScrollArea = React.forwardRef<
className={cn("relative overflow-hidden", className)}
{...props}
>
<ScrollAreaPrimitive.Viewport className="h-full w-full scroll-smooth rounded-[inherit]">
<ScrollAreaPrimitive.Viewport className="relative h-full w-full scroll-smooth rounded-[inherit]">
{children}
</ScrollAreaPrimitive.Viewport>
<ScrollBar />
Expand Down
2 changes: 1 addition & 1 deletion client/src/containers/profile/file-upload/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ const FileUpload: FC = () => {
<p className="text-sm">
{files.length < MAX_FILES
? "Drop files, or click to upload"
: "Max amount of files exceeded"}
: "You've attached the maximum of 2 files"}
</p>
</div>
</Card>
Expand Down
16 changes: 7 additions & 9 deletions client/src/containers/profile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ export default function Profile() {
},
{
root: ref.current,
threshold: 0,
threshold: 0.1,
/**
* This rootMargin creates a horizontal line vertically centered
* that will help trigger an intersection at that the very point.
*/
rootMargin: "-50% 0% -50% 0%",
rootMargin: "-20% 0% -60% 0%",
},
);

Expand All @@ -121,14 +121,12 @@ export default function Profile() {
<h2 className="text-2xl font-medium">User area</h2>
</div>

<div className="grid h-full grid-cols-[317px_1fr] gap-6 overflow-hidden pl-4">
<div className="h-full">
<ProfileSidebar
navItems={sections.map((s) => ({ id: s.id, name: s.title }))}
/>
</div>
<div className="relative grid h-full grid-cols-[317px_1fr] gap-6 overflow-hidden pl-4">
<ProfileSidebar
navItems={sections.map((s) => ({ id: s.id, name: s.title }))}
/>
<ScrollArea ref={ref} className="pr-6">
<div id="profile-sections-container" className="space-y-2 pb-20">
<div id="profile-sections-container" className="space-y-2 pb-80">
{sections.map(({ Component, ...rest }) => (
<ProfileSection key={rest.id} {...rest}>
<Component />
Expand Down

0 comments on commit 2e9e7d2

Please sign in to comment.