2020-11-21 13:19:05 +01:00
|
|
|
import React from 'react'
|
|
|
|
|
2020-12-13 14:04:25 +01:00
|
|
|
import ScreenSharedAccount from '@screens/Shared/Account'
|
|
|
|
import ScreenSharedHashtag from '@screens/Shared/Hashtag'
|
|
|
|
import ScreenSharedToot from '@screens/Shared/Toot'
|
|
|
|
import ScreenSharedWebview from '@screens/Shared/Webview'
|
|
|
|
import Compose from '@screens/Shared/Compose'
|
|
|
|
import ComposeEditAttachment from '@screens/Shared/Compose/EditAttachment'
|
|
|
|
import ScreenSharedSearch from '@screens/Shared/Search'
|
2020-11-30 00:24:53 +01:00
|
|
|
import { useTranslation } from 'react-i18next'
|
2020-11-21 13:19:05 +01:00
|
|
|
|
2020-11-24 00:18:47 +01:00
|
|
|
const sharedScreens = (Stack: any) => {
|
2020-11-30 00:24:53 +01:00
|
|
|
const { t } = useTranslation()
|
|
|
|
|
2020-11-21 13:19:05 +01:00
|
|
|
return [
|
|
|
|
<Stack.Screen
|
|
|
|
key='Screen-Shared-Account'
|
|
|
|
name='Screen-Shared-Account'
|
|
|
|
component={ScreenSharedAccount}
|
|
|
|
options={{
|
|
|
|
headerTranslucent: true,
|
|
|
|
headerStyle: { backgroundColor: 'rgba(255, 255, 255, 0)' },
|
2020-11-22 00:46:23 +01:00
|
|
|
headerCenter: () => <></>
|
2020-11-21 13:19:05 +01:00
|
|
|
}}
|
|
|
|
/>,
|
|
|
|
<Stack.Screen
|
|
|
|
key='Screen-Shared-Hashtag'
|
|
|
|
name='Screen-Shared-Hashtag'
|
|
|
|
component={ScreenSharedHashtag}
|
|
|
|
options={({ route }: any) => ({
|
|
|
|
title: `#${decodeURIComponent(route.params.hashtag)}`
|
|
|
|
})}
|
|
|
|
/>,
|
|
|
|
<Stack.Screen
|
|
|
|
key='Screen-Shared-Toot'
|
|
|
|
name='Screen-Shared-Toot'
|
|
|
|
component={ScreenSharedToot}
|
|
|
|
options={() => ({
|
2020-11-30 00:24:53 +01:00
|
|
|
title: t('sharedToot:heading')
|
2020-11-21 13:19:05 +01:00
|
|
|
})}
|
|
|
|
/>,
|
|
|
|
<Stack.Screen
|
|
|
|
key='Screen-Shared-Webview'
|
|
|
|
name='Screen-Shared-Webview'
|
|
|
|
component={ScreenSharedWebview}
|
2020-11-30 00:24:53 +01:00
|
|
|
options={() => ({
|
|
|
|
stackPresentation: 'modal'
|
|
|
|
})}
|
2020-11-21 13:19:05 +01:00
|
|
|
/>,
|
|
|
|
<Stack.Screen
|
2020-11-22 00:57:43 +01:00
|
|
|
key='Screen-Shared-Compose'
|
|
|
|
name='Screen-Shared-Compose'
|
|
|
|
component={Compose}
|
2020-11-21 13:19:05 +01:00
|
|
|
options={{
|
|
|
|
stackPresentation: 'fullScreenModal'
|
|
|
|
}}
|
2020-11-24 00:18:47 +01:00
|
|
|
/>,
|
2020-12-06 12:52:29 +01:00
|
|
|
<Stack.Screen
|
|
|
|
key='Screen-Shared-Compose-EditAttachment'
|
|
|
|
name='Screen-Shared-Compose-EditAttachment'
|
|
|
|
component={ComposeEditAttachment}
|
|
|
|
options={{
|
2020-12-06 16:06:38 +01:00
|
|
|
stackPresentation: 'modal',
|
2020-12-06 12:52:29 +01:00
|
|
|
}}
|
|
|
|
/>,
|
2020-11-24 00:18:47 +01:00
|
|
|
<Stack.Screen
|
|
|
|
key='Screen-Shared-Search'
|
|
|
|
name='Screen-Shared-Search'
|
|
|
|
component={ScreenSharedSearch}
|
|
|
|
options={{
|
|
|
|
stackPresentation: 'modal'
|
|
|
|
}}
|
2020-11-21 13:19:05 +01:00
|
|
|
/>
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
export default sharedScreens
|