Skip to content

Commit

Permalink
Fix unable to pan to capital in info side bar
Browse files Browse the repository at this point in the history
  • Loading branch information
nickbabcock committed Jan 24, 2022
1 parent eee736e commit ed087ae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app/src/features/eu4/features/info/InfoDrawer.tsx
Expand Up @@ -31,6 +31,7 @@ import {
import { FlipBook, StringFlipBook } from "../../components/flip-book";
import { ModList } from "./ModList";
import { useComputeOnSave } from "@/features/engine/worker/wasm-worker-context";
import { useSideBarContainerRef } from "../../components/SideBarContainer";

const { useBreakpoint } = Grid;

Expand All @@ -56,6 +57,7 @@ export const InfoDrawer: React.FC<{}> = () => {
const achievements = useEu4Achievements();
const serverFile = useAppSelector((state) => state.eu4.serverSaveFile);
const { data } = useComputeOnSave(playerHistories);
const sideBarContainerRef = useSideBarContainerRef();

const visibleTag = useCallback(
async (tag: string) => {
Expand Down Expand Up @@ -90,7 +92,7 @@ export const InfoDrawer: React.FC<{}> = () => {
const patch = `${version.first}.${version.second}.${version.third}.${version.fourth}`;
const descriptionStyle = { verticalAlign: "middle" };
return (
<div>
<div ref={sideBarContainerRef}>
<Descriptions>
{serverFile && (
<Descriptions.Item label="Uploaded">
Expand Down

0 comments on commit ed087ae

Please sign in to comment.