Skip to content

Commit

Permalink
fix: jumping scrollbar on resume editor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
divyaswormakai authored and xitanggg committed Oct 29, 2024
1 parent b5d3bc4 commit e0a98cd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
15 changes: 7 additions & 8 deletions src/app/components/ResumeForm/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"use client";
import { useState } from "react";
import {
useAppSelector,
useSaveStateToLocalStorageOnChange,
Expand Down Expand Up @@ -29,17 +28,17 @@ export const ResumeForm = () => {
useSaveStateToLocalStorageOnChange();

const formsOrder = useAppSelector(selectFormsOrder);
const [isHover, setIsHover] = useState(false);

return (
<div
className={cx(
"flex justify-center scrollbar scrollbar-track-gray-100 scrollbar-w-3 md:h-[calc(100vh-var(--top-nav-bar-height))] md:justify-end md:overflow-y-scroll",
isHover && "scrollbar-thumb-gray-200"
<div
className={cx(
"flex justify-center md:h-[calc(100vh-var(--top-nav-bar-height))] md:justify-end md:overflow-y-scroll",
"scrollbar-thumb-gray-200",
)}
onMouseOver={() => setIsHover(true)}
onMouseLeave={() => setIsHover(false)}
>
<div className="absolute top-0 bottom-0 right-0 w-3 bg-gray-200">
</div>

<section className="flex max-w-2xl flex-col gap-8 p-[var(--resume-padding)]">
<ProfileForm />
{formsOrder.map((form) => {
Expand Down
2 changes: 1 addition & 1 deletion src/app/resume-builder/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default function Create() {
<Provider store={store}>
<main className="relative h-full w-full overflow-hidden bg-gray-50">
<div className="grid grid-cols-3 md:grid-cols-6">
<div className="col-span-3">
<div className="col-span-3 relative">
<ResumeForm />
</div>
<div className="col-span-3">
Expand Down

0 comments on commit e0a98cd

Please sign in to comment.