diff --git a/ts/components/MyStories.tsx b/ts/components/MyStories.tsx index 772a2e4e2..75e866944 100644 --- a/ts/components/MyStories.tsx +++ b/ts/components/MyStories.tsx @@ -18,23 +18,29 @@ import { StoryImage } from './StoryImage'; import { Theme } from '../util/theme'; import { resolveStorySendStatus } from '../util/resolveStorySendStatus'; import { useRetryStorySend } from '../hooks/useRetryStorySend'; +import { NavSidebar } from './NavSidebar'; export type PropsType = { i18n: LocalizerType; + navTabsCollapsed: boolean; myStories: Array; onBack: () => unknown; onDelete: (story: StoryViewType) => unknown; onForward: (storyId: string) => unknown; onSave: (story: StoryViewType) => unknown; onMediaPlaybackStart: () => void; + onToggleNavTabsCollapse: (navTabsCollapsed: boolean) => void; queueStoryDownload: (storyId: string) => unknown; retryMessageSend: (messageId: string) => unknown; viewStory: ViewStoryActionCreatorType; hasViewReceiptSetting: boolean; + preferredLeftPaneWidth: number; + savePreferredLeftPaneWidth: (preferredLeftPaneWidth: number) => void; }; export function MyStories({ i18n, + navTabsCollapsed, myStories, onBack, onDelete, @@ -45,6 +51,9 @@ export function MyStories({ viewStory, hasViewReceiptSetting, onMediaPlaybackStart, + onToggleNavTabsCollapse, + preferredLeftPaneWidth, + savePreferredLeftPaneWidth, }: PropsType): JSX.Element { const [confirmDeleteStory, setConfirmDeleteStory] = useState< StoryViewType | undefined @@ -68,50 +77,50 @@ export function MyStories({ {i18n('icu:MyStories__delete')} )} -
-
-
- {myStories.map(list => ( -
-
- + +
+ {myStories.map(list => ( +
+
+ +
+ {list.stories.map(story => ( + + ))}
- {list.stories.map(story => ( - - ))} -
- ))} -
- {!myStories.length && ( -
- {i18n('icu:Stories__list-empty')} + ))}
- )} + {!myStories.length && ( +
+ {i18n('icu:Stories__list-empty')} +
+ )} + ); } diff --git a/ts/components/StoriesTab.tsx b/ts/components/StoriesTab.tsx index 4269f26ec..0a51d4fdd 100644 --- a/ts/components/StoriesTab.tsx +++ b/ts/components/StoriesTab.tsx @@ -107,13 +107,17 @@ export function StoriesTab({ hasViewReceiptSetting={hasViewReceiptSetting} i18n={i18n} myStories={myStories} + navTabsCollapsed={navTabsCollapsed} onBack={() => setIsMyStories(false)} onDelete={deleteStoryForEveryone} onForward={onForwardStory} onSave={onSaveStory} onMediaPlaybackStart={onMediaPlaybackStart} + onToggleNavTabsCollapse={onToggleNavTabsCollapse} + preferredLeftPaneWidth={preferredLeftPaneWidth} queueStoryDownload={queueStoryDownload} retryMessageSend={retryMessageSend} + savePreferredLeftPaneWidth={savePreferredLeftPaneWidth} viewStory={viewStory} /> ) : (