Skip to content

Commit

Permalink
PanelStack 로직 롤백했다
Browse files Browse the repository at this point in the history
  • Loading branch information
healtheloper committed Dec 15, 2023
1 parent 69c4425 commit c329ee4
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,10 @@ export const PanelStack = <T extends Panel<object>>({
const [mount, toggleMount] = useToggle(true);
const handlePushPanel = useCallback(
(panel: T) => {
onPush?.(panel);
append(panel);
toggleMount(false);
pushAnimate(panel);
pushAnimate();
},
[onPush, append, toggleMount],
);
Expand All @@ -91,10 +93,8 @@ export const PanelStack = <T extends Panel<object>>({
popAnimate();
}, [onPop, pop]);

const [pushAnimate] = useTimeoutFn((panel) => {
const [pushAnimate] = useTimeoutFn(() => {
toggleMount(true);
onPush?.(panel);
append(panel);
}, transitionDuration);

const [popAnimate] = useTimeoutFn(() => {
Expand Down

0 comments on commit c329ee4

Please sign in to comment.