-
Notifications
You must be signed in to change notification settings - Fork 20
feat: Create Community Pools #296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
6965e9c
chore: add pool type icons
pbkompasz 861a4ba
chore: add redirect
pbkompasz 54f7a48
feat: add create collective page
pbkompasz 87f76e2
chore: refactor into compoennt
pbkompasz 7357ef0
feat: create basic components
pbkompasz 34ecd36
feat: welcome component skeleton
pbkompasz 18a4588
chore: select collective type skeleton
pbkompasz 6876cd5
feat: add correct styles
pbkompasz 614fcfc
chore: add assets
pbkompasz 0aca4c0
fix: style
pbkompasz ee36f03
feat: styling
pbkompasz 3753dff
chore: refactor
pbkompasz a357a59
chore: refactor component
pbkompasz e7ec339
chore: skeleton
pbkompasz 890b42f
chore: cleanup
pbkompasz b9e0812
chore: rename
pbkompasz 9d1418d
chore: remove
pbkompasz 0e97d3f
feat: add types, save partial form state, etc.
pbkompasz e71fb1e
fix: ai code review
pbkompasz 90ea6ba
chore: rename
pbkompasz fa9b749
chore: assets
pbkompasz f69467c
feat: refactor into hook
pbkompasz 627e220
feat: pass node as option
pbkompasz 182370f
feat: Warning Box
pbkompasz bf90e31
chore: simplify
pbkompasz 38bed34
chore: use hook
pbkompasz f15eb8d
feat: styles + features + validation
pbkompasz 5cd09e0
chore: cleanup
pbkompasz 092428a
chore: remove log
pbkompasz 906ba52
feat: add error styles, validation, img
pbkompasz ff43e12
chore: minor fix
pbkompasz f0a4835
chore: fix validation
pbkompasz eadb401
chore: minor
pbkompasz 888ec58
chore: refactor
pbkompasz 1e7ca29
feat: file uploader component
pbkompasz 882fbe9
chore: assets
pbkompasz 9606f05
chore: minor fixes
pbkompasz 0708729
chore: mobile fix
pbkompasz 9577629
fix: change admin address logic
pbkompasz f3b0f2a
feat: project id
pbkompasz cabcd14
chore: project name cannot contain special characters, max length all…
pbkompasz e2827f2
feat: add images by url
pbkompasz 7936628
chore: add missing return type
pbkompasz bcc6c59
feat: show progress in modal
pbkompasz 99ff867
feat: images as File -> imagfe as Url
pbkompasz eb817d3
feat: change account
pbkompasz d40b831
fix: remove img if wrong
pbkompasz 88de495
chore: cleanup
pbkompasz 1bf24a5
(temporary)fix: button width on mobile
pbkompasz 8c278d7
chore: added better error message for image uploads
pbkompasz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 hidden or 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 hidden or 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,43 @@ | ||
| import { useRef, useState } from 'react'; | ||
| import { Box, Center, Pressable, Text } from 'native-base'; | ||
|
|
||
| import { UploadIcon } from '../assets'; | ||
|
|
||
| const FileUpload = ({ style, onUpload }: { style: Object | {}; onUpload: Function }) => { | ||
| const uploader = useRef(null); | ||
| const [fileName, setFileName] = useState<string>(''); | ||
|
|
||
| return ( | ||
| <Pressable onPress={() => (uploader.current as unknown as HTMLInputElement)?.click()}> | ||
| <Box | ||
| style={style as {}} | ||
| borderWidth={2} | ||
| borderRadius={8} | ||
| borderStyle="dotted" | ||
| borderColor="gray.300" | ||
| backgroundColor="white" | ||
| mt={2} | ||
| padding={6}> | ||
| <Center> | ||
| <img src={UploadIcon} alt="" /> | ||
| {!fileName && <Text>Click to upload</Text>} | ||
| <Text overflow="hidden">{fileName}</Text> | ||
| </Center> | ||
| </Box> | ||
| <input | ||
| style={{ display: 'none' }} | ||
| ref={uploader} | ||
| type="file" | ||
| name="myImage" | ||
| accept="image/svg+xml,image/png,image/jpeg,image/gif" | ||
| onChange={(event) => { | ||
| if (!event.target.files) return; | ||
| setFileName(event.target.files[0].name); | ||
| onUpload(event.target.files[0]); | ||
| }} | ||
| /> | ||
| </Pressable> | ||
| ); | ||
| }; | ||
|
|
||
| export default FileUpload; |
This file contains hidden or 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,45 @@ | ||
| import { Text, Image, HStack, Link, VStack } from 'native-base'; | ||
| import { InfoIconOrange } from '../assets'; | ||
|
|
||
| const WarningBox = ({ content, explanationProps = {} }: any) => { | ||
| const Explanation = content.Explanation; | ||
|
|
||
| return ( | ||
| <HStack space={2} backgroundColor="goodOrange.200" maxWidth="343" paddingY={3} paddingX={2}> | ||
| <Image source={{ uri: InfoIconOrange }} style={{ width: 16, height: 16 }} /> | ||
| <VStack space={4} maxWidth="100%"> | ||
| <VStack space={1}> | ||
| <Text variant="bold" color="goodOrange.500"> | ||
| {content.title} | ||
| </Text> | ||
|
|
||
| {Explanation ? <Explanation {...explanationProps} /> : null} | ||
| </VStack> | ||
| {content.suggestion ? ( | ||
| <VStack space={2}> | ||
| <Text variant="bold" color="goodOrange.500"> | ||
| You may: | ||
| </Text> | ||
| <VStack space={0}> | ||
| <Text color="goodOrange.500" flexDir="column" display="flex"> | ||
| {content.suggestion.map((suggestion: string, index: number) => ( | ||
| <Text key={index}> | ||
| {index + 1}. {suggestion} | ||
| </Text> | ||
| ))} | ||
| {content.href && ( | ||
| <Link color="goodOrange.500" href={content.href} isExternal> | ||
| <Text>{content.suggestion.length + 1}. </Text> | ||
| <Text textDecorationLine="underline">Purchase and use GoodDollar</Text> | ||
| </Link> | ||
| )} | ||
| </Text> | ||
| </VStack> | ||
| </VStack> | ||
| ) : null} | ||
| </VStack> | ||
| </HStack> | ||
| ); | ||
| }; | ||
|
|
||
| export default WarningBox; | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
suggestion (code-quality): Prefer object destructuring when accessing and using properties. (
use-object-destructuring)Explanation
Object destructuring can often remove an unnecessary temporary reference, as well as making your code more succinct.From the Airbnb Javascript Style Guide