Skip to content
Closed
Show file tree
Hide file tree
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 Jun 27, 2025
861a4ba
chore: add redirect
pbkompasz Jun 27, 2025
54f7a48
feat: add create collective page
pbkompasz Jun 27, 2025
87f76e2
chore: refactor into compoennt
pbkompasz Jun 27, 2025
7357ef0
feat: create basic components
pbkompasz Jun 27, 2025
34ecd36
feat: welcome component skeleton
pbkompasz Jun 27, 2025
18a4588
chore: select collective type skeleton
pbkompasz Jun 27, 2025
6876cd5
feat: add correct styles
pbkompasz Jun 27, 2025
614fcfc
chore: add assets
pbkompasz Jun 27, 2025
0aca4c0
fix: style
pbkompasz Jun 27, 2025
ee36f03
feat: styling
pbkompasz Jun 27, 2025
3753dff
chore: refactor
pbkompasz Jun 27, 2025
a357a59
chore: refactor component
pbkompasz Jun 28, 2025
e7ec339
chore: skeleton
pbkompasz Jun 28, 2025
890b42f
chore: cleanup
pbkompasz Jun 28, 2025
b9e0812
chore: rename
pbkompasz Jun 28, 2025
9d1418d
chore: remove
pbkompasz Jun 28, 2025
0e97d3f
feat: add types, save partial form state, etc.
pbkompasz Jun 28, 2025
e71fb1e
fix: ai code review
pbkompasz Jul 1, 2025
90ea6ba
chore: rename
pbkompasz Jul 1, 2025
fa9b749
chore: assets
pbkompasz Jul 2, 2025
f69467c
feat: refactor into hook
pbkompasz Jul 2, 2025
627e220
feat: pass node as option
pbkompasz Jul 2, 2025
182370f
feat: Warning Box
pbkompasz Jul 2, 2025
bf90e31
chore: simplify
pbkompasz Jul 2, 2025
38bed34
chore: use hook
pbkompasz Jul 2, 2025
f15eb8d
feat: styles + features + validation
pbkompasz Jul 2, 2025
5cd09e0
chore: cleanup
pbkompasz Jul 2, 2025
092428a
chore: remove log
pbkompasz Jul 3, 2025
906ba52
feat: add error styles, validation, img
pbkompasz Jul 4, 2025
ff43e12
chore: minor fix
pbkompasz Jul 4, 2025
f0a4835
chore: fix validation
pbkompasz Jul 4, 2025
eadb401
chore: minor
pbkompasz Jul 5, 2025
888ec58
chore: refactor
pbkompasz Jul 5, 2025
1e7ca29
feat: file uploader component
pbkompasz Jul 5, 2025
882fbe9
chore: assets
pbkompasz Jul 5, 2025
9606f05
chore: minor fixes
pbkompasz Jul 5, 2025
0708729
chore: mobile fix
pbkompasz Jul 5, 2025
9577629
fix: change admin address logic
pbkompasz Jul 30, 2025
f3b0f2a
feat: project id
pbkompasz Jul 30, 2025
cabcd14
chore: project name cannot contain special characters, max length all…
pbkompasz Jul 30, 2025
e2827f2
feat: add images by url
pbkompasz Jul 30, 2025
7936628
chore: add missing return type
pbkompasz Jul 30, 2025
bcc6c59
feat: show progress in modal
pbkompasz Jul 30, 2025
99ff867
feat: images as File -> imagfe as Url
pbkompasz Aug 5, 2025
eb817d3
feat: change account
pbkompasz Aug 5, 2025
d40b831
fix: remove img if wrong
pbkompasz Aug 5, 2025
88de495
chore: cleanup
pbkompasz Aug 5, 2025
1bf24a5
(temporary)fix: button width on mobile
pbkompasz Aug 20, 2025
8c278d7
chore: added better error message for image uploads
pbkompasz Aug 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions packages/app/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import { Colors } from './utils/colors';
import { WagmiAdapter } from '@reown/appkit-adapter-wagmi';
import { useCreateSubgraphApolloClient, useCreateMongoDbApolloClient } from './hooks/apollo';
import { MongoDbApolloProvider } from './components/providers/MongoDbApolloProvider';
import CreateGoodCollectivePage from './pages/CreateGoodCollectivePage';
import { CreatePoolProvider } from './hooks/useCreatePool';

const queryClient = new QueryClient();
const projectId = 'b1b7664bfba2f6ad5538aa7fa9a2404f';
Expand Down Expand Up @@ -67,6 +69,14 @@ function App(): JSX.Element {
<Routing.Routes>
<Routing.Route path="/" element={<HomePage />} />
<Routing.Route path="/about" element={<AboutPage />} />
<Routing.Route
path="/create"
element={
<CreatePoolProvider>
<CreateGoodCollectivePage />
</CreatePoolProvider>
}
/>
<Routing.Route path="/collective/:id" element={<ViewCollectivePage />} />
<Routing.Route path="/collective/:id/stewards" element={<ViewStewardsPage />} />
<Routing.Route path="/collective/:id/donors" element={<ViewDonorsPage />} />
Expand Down
Binary file added packages/app/src/assets/CommunityFundsIcon.png
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.
3 changes: 3 additions & 0 deletions packages/app/src/assets/DefaultIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/app/src/assets/DiscordIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/app/src/assets/EditIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/app/src/assets/Mask.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/app/src/assets/ResultsBasedIcon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/app/src/assets/RocketLaunchIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/app/src/assets/SegmentedAidIcon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions packages/app/src/assets/SettingsIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions packages/app/src/assets/SuccessGuyIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/app/src/assets/SuccessIcon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/app/src/assets/ThreadsIcon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/app/src/assets/UploadIcon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions packages/app/src/assets/WebsiteIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions packages/app/src/assets/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,17 @@ export { default as Woman } from './Woman.svg';
export { default as chevronDown } from './chevron-down.svg';
export { default as chevronRight } from './chevron-right.svg';
export { default as empty } from './empty.svg';
export { default as CommunityFundsIcon } from './CommunityFundsIcon.png';
export { default as ResultsBasedIcon } from './ResultsBasedIcon.png';
export { default as SegmentedAidIcon } from './SegmentedAidIcon.png';
export { default as CreateCollectiveLogo } from './CreateCollectiveLogo.png';
export { default as UploadIcon } from './UploadIcon.png';
export { default as RocketLaunchIcon } from './RocketLaunchIcon.svg';
export { default as EditIcon } from './EditIcon.svg';
export { default as Mask } from './Mask.png';
export { default as SuccessIcon } from './SuccessIcon.png';
export { default as SuccessGuyIcon } from './SuccessGuyIcon.svg';
export { default as SettingsIcon } from './SettingsIcon.svg';
export { default as DefaultIcon } from './DefaultIcon.svg';
export { default as DiscordIcon } from './DiscordIcon.svg';
export { default as WebsiteIcon } from './WebsiteIcon.svg';
8 changes: 5 additions & 3 deletions packages/app/src/components/ActionButton.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import { Box, Link, Pressable, Text, useBreakpointValue } from 'native-base';
import { ReactNode } from 'react';

import { InterSemiBold } from '../utils/webFonts';

type ActionButtonProps = {
href?: string;
text: string;
text: string | ReactNode;
bg: string;
textColor: string;
onPress?: any;
width?: string;
};

export const buttonStyles = {
Expand Down Expand Up @@ -38,7 +40,7 @@ export const buttonStyles = {
},
};

const ActionButton = ({ href, text, bg, textColor, onPress }: ActionButtonProps) => {
const ActionButton = ({ href, text, bg, textColor, onPress, width = '100%' }: ActionButtonProps) => {
const responsiveStyles = useBreakpointValue({
base: {
button: {
Expand All @@ -53,7 +55,7 @@ const ActionButton = ({ href, text, bg, textColor, onPress }: ActionButtonProps)
},
buttonContainer: {
...buttonStyles.buttonContainer,
width: '100%',
width,
},
},
lg: buttonStyles,
Expand Down
43 changes: 43 additions & 0 deletions packages/app/src/components/FileUpload.tsx
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;
45 changes: 45 additions & 0 deletions packages/app/src/components/WarningBox.tsx
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;
Copy link

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)

Suggested change
const Explanation = content.Explanation;
const {Explanation} = content;


ExplanationObject destructuring can often remove an unnecessary temporary reference, as well as making your code more succinct.

From the Airbnb Javascript Style Guide


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;
Loading
Loading