Skip to content
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

Add "submit on Github" on project page #207

Merged
merged 7 commits into from
Feb 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 5 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Bug fixes

-[#219](https://github.com/alleslabs/celatone-frontend/pull/219) Fix asset value and price formatter

- [#206](https://github.com/alleslabs/celatone-frontend/pull/206) Refactor copy functionality into one component
- [#219](https://github.com/alleslabs/celatone-frontend/pull/219) Fix asset value and price formatter
- [#217](https://github.com/alleslabs/celatone-frontend/pull/217) Fix state reset in Save New Code modal and no permission in migration

### Bug fixes
### Improvements

- [#217](https://github.com/alleslabs/celatone-frontend/pull/217) Fix state reset in Save New Code modal and no permission in migration
- [#207](https://github.com/alleslabs/celatone-frontend/pull/207) Add cta to submit public project in list page
- [#206](https://github.com/alleslabs/celatone-frontend/pull/206) Refactor copy functionality into one component

## v1.0.1

Expand Down
41 changes: 35 additions & 6 deletions src/lib/pages/public-project/components/AllProject.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
import { Box, SimpleGrid, Flex, Button, Icon } from "@chakra-ui/react";
import {
Box,
SimpleGrid,
Flex,
Button,
Icon,
Link,
Text,
} from "@chakra-ui/react";
import { matchSorter } from "match-sorter";
import { observer } from "mobx-react-lite";
import { useMemo, useState } from "react";
Expand All @@ -8,6 +16,7 @@ import { TextInput } from "lib/components/forms";
import { Loading } from "lib/components/Loading";
import { EmptyState } from "lib/components/state/EmptyState";
import { usePublicProjectStore } from "lib/hooks";
import { AmpEvent, AmpTrack } from "lib/services/amplitude";
import { usePublicProjects } from "lib/services/publicProjectService";
import type { PublicProjectInfo } from "lib/types";

Expand Down Expand Up @@ -50,10 +59,17 @@ export const AllProject = observer(() => {
image="https://assets.alleslabs.dev/illustration/search-empty.svg"
message="We are currently gathering public projects to feature here. If you would like to share your project with the community, please submit your request."
/>
<Button gap={2} mt={8}>
<Icon as={BsGithub} />
Submit on Github
</Button>
<Link
href="https://github.com/alleslabs/celatone-api"
target="_blank"
rel="noopener noreferrer"
onClick={() => AmpTrack(AmpEvent.USE_SUBMIT_PROJECT)}
>
<Button gap={2} mt={8}>
<Icon as={BsGithub} />
Submit on Github
</Button>
</Link>
</Flex>
);

Expand All @@ -74,7 +90,7 @@ export const AllProject = observer(() => {
image="https://assets.alleslabs.dev/illustration/search-not-found.svg"
/>
) : (
<SimpleGrid columns={{ sm: 1, md: 3, xl: 4 }} spacing={4} w="full">
<SimpleGrid columns={{ sm: 1, md: 3 }} spacing={4} w="full">
{filteredPublicProjects.map((item) => (
<PublicProjectCard
key={item.slug}
Expand All @@ -84,6 +100,19 @@ export const AllProject = observer(() => {
))}
</SimpleGrid>
)}
<Flex justifyContent="center" gap="2" w="100%" mt="64px">
<Text color="text.dark" variant="body2">
Want your project here?
</Text>
<Link
href="https://github.com/alleslabs/celatone-api"
target="_blank"
rel="noopener noreferrer"
onClick={() => AmpTrack(AmpEvent.USE_SUBMIT_PROJECT)}
>
Submit on Github
</Link>
</Flex>
</Box>
);
});
8 changes: 7 additions & 1 deletion src/lib/pages/public-project/components/SocialMedia.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,13 @@ export const SocialMedia = ({ details }: SocialMediaProps) => {
onClick={() => AmpTrackWebsite(details.website)}
/>
)}
{details.github && <IconButton href={details.github} icon={FaGithub} />}
{details.github && (
<IconButton
href={details.github}
icon={FaGithub}
onClick={() => AmpTrackSocial(details.github)}
/>
)}
{details.socials.length &&
details.socials.map(
(social) =>
Expand Down
1 change: 1 addition & 0 deletions src/lib/services/amplitude.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export enum AmpEvent {
USE_QUICK_EDIT_CONTRACT = "Use Quick Edit Contract",
USE_QUICK_EDIT_CODE = "Use Quick Edit Code",
USE_OTHER_MODAL = "Use Other Modal",
USE_SUBMIT_PROJECT = "Use Submit Project",
// TX
TX_SUCCEED = "Tx Succeed",
TX_FAILED = "Tx Failed",
Expand Down