diff --git a/src/app/layout/RootLayout.tsx b/src/app/layout/RootLayout.tsx
index 58ce683..8490b3d 100644
--- a/src/app/layout/RootLayout.tsx
+++ b/src/app/layout/RootLayout.tsx
@@ -1,6 +1,6 @@
import { IPhoneLayout } from 'react-iphone-layout';
import 'react-iphone-layout/dist/ReactIPhoneLayout.css';
-import { Outlet } from 'react-router-dom';
+import { Outlet, ScrollRestoration } from 'react-router-dom';
import './RootLayout.scss';
@@ -15,6 +15,11 @@ export const RootLayout = () => {
+ {
+ return location.pathname;
+ }}
+ />
);
};
diff --git a/src/pages/feed-main/ui/FeedMainPage.tsx b/src/pages/feed-main/ui/FeedMainPage.tsx
index 42d918c..a96c6ce 100644
--- a/src/pages/feed-main/ui/FeedMainPage.tsx
+++ b/src/pages/feed-main/ui/FeedMainPage.tsx
@@ -1,8 +1,17 @@
+import { useEffect } from 'react';
+
+import { useFeedKebabStore } from '@/widgets/feed-kebab';
import { FeedMainHeader } from '@/widgets/feed-main-header';
import { FeedMainList } from '@/widgets/feed-main-list';
import './FeedMainPage.scss';
export const FeedMainPage = () => {
+ useEffect(() => {
+ return () => {
+ useFeedKebabStore.getState().closeKebab();
+ };
+ }, []);
+
return (
diff --git a/src/widgets/feed-kebab/index.ts b/src/widgets/feed-kebab/index.ts
index bdff833..2203f57 100644
--- a/src/widgets/feed-kebab/index.ts
+++ b/src/widgets/feed-kebab/index.ts
@@ -1 +1,2 @@
export { FeedKebabButton } from './ui';
+export { useFeedKebabStore } from './store';