-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
273 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
import { useNavigation } from '@react-navigation/native'; | ||
import { useState } from 'react'; | ||
import { View, Text } from 'react-native'; | ||
import { useStyles, useTheme } from '../../hooks'; | ||
import { MainStackNavigationProps } from '../../types'; | ||
import { SelectedTab, TABS_COMMUNITY, TABS_TIP_LIST } from '../../types/tab'; | ||
import stylesheet from './styles'; | ||
import { Button, Input, Modal } from '../../components'; | ||
|
||
export const DAOComponent: React.FC = () => { | ||
const styles = useStyles(stylesheet); | ||
const theme = useTheme(); | ||
const navigation = useNavigation<MainStackNavigationProps>(); | ||
const [selectedTab, setSelectedTab] = useState<SelectedTab | undefined>(SelectedTab.ALL_GROUP); | ||
const handleTabSelected = (tab: string | SelectedTab, screen?: string) => { | ||
setSelectedTab(tab as any); | ||
if (screen) { | ||
navigation.navigate(screen as any); | ||
} | ||
}; | ||
|
||
|
||
const [isFormCreateDao, setIsFormCreateDao] = useState(false); | ||
const handleFormCreateDao = () => { | ||
|
||
setIsFormCreateDao(!isFormCreateDao); | ||
// navigation.navigate('MainStack', { screen: 'CreateForm' }); | ||
} | ||
|
||
const handleCallbackCreateDao = () => { | ||
|
||
} | ||
return ( | ||
<View style={styles.container}> | ||
|
||
{isFormCreateDao && ( | ||
<View> | ||
<Text style={styles.text}>Create DAO</Text> | ||
<Modal | ||
style={{ height: "90%" }} | ||
// style={styles.modal} | ||
> | ||
<View> | ||
|
||
|
||
<Input> | ||
</Input> | ||
|
||
|
||
<Button | ||
onPress={handleCallbackCreateDao} | ||
> | ||
<Text>Create</Text> | ||
</Button> | ||
</View> | ||
</Modal> | ||
</View> | ||
)} | ||
|
||
<Text style={styles.text}>DAO coming soon</Text> | ||
|
||
|
||
<Button | ||
onPress={handleFormCreateDao} | ||
> | ||
<Text>Create DAO</Text> | ||
|
||
</Button> | ||
</View> | ||
); | ||
}; |
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,66 @@ | ||
import {Spacing, ThemedStyleSheet} from '../../styles'; | ||
|
||
export default ThemedStyleSheet((theme) => ({ | ||
container: { | ||
flex: 1, | ||
backgroundColor: theme.colors.background, | ||
paddingVertical: Spacing.xxxsmall, | ||
paddingHorizontal: Spacing.normal, | ||
}, | ||
text: { | ||
color: theme.colors.text, | ||
}, | ||
|
||
flatListContent: { | ||
paddingHorizontal: Spacing.pagePadding, | ||
paddingVertical: Spacing.medium, | ||
}, | ||
|
||
separator: { | ||
height: 1, | ||
backgroundColor: theme.colors.divider, | ||
}, | ||
|
||
tip: { | ||
flexDirection: 'row', | ||
justifyContent: 'space-between', | ||
backgroundColor: theme.colors.surface, | ||
padding: Spacing.xsmall, | ||
borderRadius: 8, | ||
gap: Spacing.xsmall, | ||
}, | ||
tipInfo: { | ||
gap: Spacing.xxsmall, | ||
}, | ||
token: { | ||
flex: 1, | ||
flexDirection: 'row', | ||
gap: Spacing.xsmall, | ||
}, | ||
|
||
senderInfo: { | ||
flex: 1, | ||
flexDirection: 'row', | ||
justifyContent: 'space-between', | ||
alignItems: 'center', | ||
gap: Spacing.medium, | ||
}, | ||
sender: { | ||
flex: 1, | ||
}, | ||
|
||
buttonIndicator: { | ||
marginRight: Spacing.xsmall, | ||
}, | ||
createPostButton: { | ||
position: 'absolute', | ||
bottom: Spacing.large, | ||
right: Spacing.pagePadding, | ||
}, | ||
modal: { | ||
// backgroundColor: theme.colors.background, | ||
// padding: Spacing.normal, | ||
// borderRadius: 8, | ||
height: '100%', | ||
}, | ||
})); |
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,40 @@ | ||
import {useState} from 'react'; | ||
import {KeyboardAvoidingView, ScrollView, Text, View} from 'react-native'; | ||
import {SafeAreaView} from 'react-native-safe-area-context'; | ||
import {TextButton} from '../../components'; | ||
import {useStyles, useTheme} from '../../hooks'; | ||
import { DAOScreenProps} from '../../types'; | ||
import {SelectedTab, TABS_CONSOLE} from '../../types/tab'; | ||
import stylesheet from './styles'; | ||
import { DAOComponent } from '../../modules/DAO'; | ||
|
||
export const DAOScreen: React.FC<DAOScreenProps> = ({navigation}) => { | ||
const theme = useTheme(); | ||
const styles = useStyles(stylesheet); | ||
const [selectedTab, setSelectedTab] = useState<SelectedTab | undefined>( | ||
SelectedTab.LAUNCHPAD_VIEW, | ||
); | ||
const handleTabSelected = (tab: string | SelectedTab, screen?: string) => { | ||
setSelectedTab(tab as any); | ||
if (screen) { | ||
navigation.navigate(screen as any); | ||
} | ||
}; | ||
return ( | ||
<View style={styles.container}> | ||
<SafeAreaView edges={['top', 'left', 'right']} style={styles.header}> | ||
<TextButton style={styles.cancelButton} onPress={navigation.goBack}> | ||
Cancel | ||
</TextButton> | ||
</SafeAreaView> | ||
<KeyboardAvoidingView behavior="padding" style={styles.content}> | ||
|
||
<SafeAreaView edges={['bottom', 'left', 'right']} style={styles.viewContent}> | ||
<ScrollView> | ||
<DAOComponent /> | ||
</ScrollView> | ||
</SafeAreaView> | ||
</KeyboardAvoidingView> | ||
</View> | ||
); | ||
}; |
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,76 @@ | ||
// import {StyleSheet} from 'react-native'; | ||
|
||
import {Spacing, ThemedStyleSheet, Typography} from '../../styles'; | ||
|
||
export default ThemedStyleSheet((theme) => ({ | ||
container: { | ||
flex: 1, | ||
color: theme.colors.text, | ||
backgroundColor: theme.colors.background, | ||
}, | ||
header: { | ||
flexDirection: 'row', | ||
justifyContent: 'space-between', | ||
backgroundColor: theme.colors.surface, | ||
paddingHorizontal: Spacing.pagePadding, | ||
// borderBottomWidth: StyleSheet.hairlineWidth, | ||
// borderBottomColor: theme.colors.divider, | ||
}, | ||
cancelButton: { | ||
paddingVertical: Spacing.small, | ||
paddingHorizontal: Spacing.xsmall, | ||
}, | ||
content: { | ||
flex: 1, | ||
backgroundColor: theme.colors.background, | ||
margin: Spacing.pagePadding, | ||
// color: theme.colors.text, | ||
}, | ||
viewContent: { | ||
flex: 1, | ||
backgroundColor: theme.colors.background, | ||
marginTop: Spacing.pagePadding, | ||
marginBottom: Spacing.pagePadding, | ||
// color: theme.colors.text, | ||
}, | ||
form: { | ||
flex: 1, | ||
}, | ||
input: { | ||
flex: 1, | ||
padding: Spacing.large, | ||
color: theme.colors.inputText, | ||
textAlignVertical: 'top', | ||
fontSize: 16, | ||
lineHeight: 24, | ||
...Typography.medium, | ||
}, | ||
imageContainer: { | ||
padding: Spacing.pagePadding, | ||
}, | ||
image: { | ||
width: '100%', | ||
resizeMode: 'cover', | ||
borderRadius: 8, | ||
overflow: 'hidden', | ||
}, | ||
|
||
buttons: { | ||
position: 'relative', | ||
}, | ||
mediaButtons: { | ||
flexDirection: 'row', | ||
paddingHorizontal: Spacing.pagePadding, | ||
paddingVertical: Spacing.small, | ||
gap: Spacing.large, | ||
alignItems: 'center', | ||
}, | ||
sendButton: { | ||
position: 'absolute', | ||
right: Spacing.pagePadding, | ||
bottom: '110%', | ||
}, | ||
text: { | ||
color: theme.colors.text, | ||
}, | ||
})); |
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