-
-
Notifications
You must be signed in to change notification settings - Fork 315
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: status bar * update Timeline.tsx * update AppLoading.tsx, StatusBar.tsx, Timeline.tsx and apps/mobile/src/hooks/index.ts * update apps/mobile/src/hooks/index.ts * update TimelineFilters.tsx * chore: bump deps (#1002) * build: update package.json * update 8 files * update 5 files * fix: og generation (#1003) * fix: og generation * build(deps): update yarn.lock * update ThumbnailImage.tsx and BytesSection.tsx * fix: thumbnail (#1004) * delete 3 files and update 7 files * update TabList.tsx * feat: manage * update ManagersModal.tsx, Managed.tsx, Managers.tsx and Accordion.tsx * fix: home loader * update Info.tsx * update Managers.tsx * feat: add 404 * update Managers.tsx * update Streak.tsx * update Streak.tsx and theme.ts * update Streak.tsx * update Streak.tsx * update Streak.tsx * update 13 files * fix: refetch loader * update Info.tsx
- Loading branch information
Showing
40 changed files
with
876 additions
and
329 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
import Ionicons from '@expo/vector-icons/Ionicons' | ||
import { type BottomSheetModal } from '@gorhom/bottom-sheet' | ||
import type { MobileThemeConfig } from '@lenstube/lens/custom-types' | ||
import type { HeaderTitleProps } from '@react-navigation/elements' | ||
import { useNavigation } from '@react-navigation/native' | ||
import type { FC } from 'react' | ||
import React, { useRef } from 'react' | ||
import { StyleSheet, Text, View } from 'react-native' | ||
|
||
import haptic from '~/helpers/haptic' | ||
import normalizeFont from '~/helpers/normalize-font' | ||
import { useMobileTheme } from '~/hooks' | ||
import useMobileStore from '~/store' | ||
|
||
import AnimatedPressable from '../../ui/AnimatedPressable' | ||
import SignIn from '../auth/SignIn' | ||
import UserProfile from '../UserProfile' | ||
import MenuSheet from './MenuSheet' | ||
|
||
const styles = (themeConfig: MobileThemeConfig) => | ||
StyleSheet.create({ | ||
container: { | ||
flexDirection: 'row', | ||
width: '100%', | ||
justifyContent: 'space-between', | ||
alignItems: 'center', | ||
paddingBottom: 10 | ||
}, | ||
rightView: { | ||
display: 'flex', | ||
flexDirection: 'row', | ||
alignItems: 'center', | ||
gap: 20 | ||
}, | ||
forYouText: { | ||
color: themeConfig.textColor, | ||
fontFamily: 'font-bold', | ||
fontWeight: '500', | ||
fontSize: normalizeFont(22) | ||
}, | ||
newButton: { | ||
width: 30, | ||
height: 30, | ||
borderRadius: 100, | ||
flexDirection: 'row', | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
backgroundColor: themeConfig.backgroudColor | ||
} | ||
}) | ||
|
||
const AuthenticatedUser = () => { | ||
const profileMenuRef = useRef<BottomSheetModal>(null) | ||
const selectedChannel = useMobileStore((state) => state.selectedChannel) | ||
|
||
if (!selectedChannel) { | ||
return null | ||
} | ||
|
||
return ( | ||
<> | ||
<UserProfile | ||
profile={selectedChannel} | ||
showHandle={false} | ||
size={30} | ||
onPress={() => { | ||
haptic() | ||
profileMenuRef.current?.present() | ||
}} | ||
/> | ||
<MenuSheet profileMenuRef={profileMenuRef} /> | ||
</> | ||
) | ||
} | ||
|
||
const Header: FC<HeaderTitleProps> = () => { | ||
const { themeConfig } = useMobileTheme() | ||
const style = styles(themeConfig) | ||
const { navigate } = useNavigation() | ||
|
||
const selectedChannel = useMobileStore((state) => state.selectedChannel) | ||
|
||
return ( | ||
<View style={style.container}> | ||
<Text style={style.forYouText}>gm</Text> | ||
|
||
<View style={style.rightView}> | ||
{selectedChannel && ( | ||
<AnimatedPressable | ||
style={style.newButton} | ||
onPress={() => navigate('NewPublication')} | ||
> | ||
<Ionicons | ||
name="add-outline" | ||
color={themeConfig.textColor} | ||
style={{ paddingLeft: 1 }} | ||
size={20} | ||
/> | ||
</AnimatedPressable> | ||
)} | ||
|
||
{selectedChannel ? <AuthenticatedUser /> : <SignIn />} | ||
</View> | ||
</View> | ||
) | ||
} | ||
|
||
export default Header |
Oops, something went wrong.
7cd0ff3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
web – ./apps/web
web-git-main-lenstube.vercel.app
web-lenstube.vercel.app
lenstube.xyz
www.lenstube.xyz
7cd0ff3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
embed – ./apps/embed
embed-git-main-lenstube.vercel.app
embed-lenstube.vercel.app
embed.lenstube.xyz
7cd0ff3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
api – ./apps/api
api-git-main-lenstube.vercel.app
api-lenstube.vercel.app
api.lenstube.xyz