Skip to content

Commit

Permalink
fix SSR of PDP
Browse files Browse the repository at this point in the history
  • Loading branch information
AaDalal committed Jun 8, 2024
1 parent 6fee7b5 commit c84615a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frontend/degree-plan/components/Dock/Dock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import AccountIndicator from "pcx-shared-components/src/accounts/AccountIndicato
import _ from 'lodash';
import CoursePlanned from '../FourYearPlan/CourseInPlan';
import CourseInDock from './CourseInDock';
import { useRouter } from 'next/router';

const DockWrapper = styled.div`
z-index: 1;
Expand Down Expand Up @@ -143,6 +144,8 @@ const Dock = ({ user, login, logout, activeDegreeplanId }: DockProps) => {
// }
// }, [isMount, dockedCourses]);

const { asPath } = useRouter();

return (
<DockWrapper ref={drop} >
<DockContainer $isDroppable={canDrop} $isOver={isOver}>
Expand All @@ -154,7 +157,7 @@ const Dock = ({ user, login, logout, activeDegreeplanId }: DockProps) => {
login={login}
logout={logout}
dropdownTop={true}
pathname={window.location.pathname}
pathname={asPath}
/>
<SearchIconContainer onClick={() => {
setSearchRuleQuery("");
Expand Down

0 comments on commit c84615a

Please sign in to comment.