Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Feat/creator tokens invite system #2544

Merged
merged 32 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
4a91b8e
feat(wip): connect invite apis
hirbod Oct 30, 2023
b864f7f
fix: optimize screen
hirbod Oct 30, 2023
d6b94d1
fix: remove wrong null check
hirbod Oct 30, 2023
d150dec
fix: copy of share screen
hirbod Oct 30, 2023
5ef0b95
Merge branch 'staging' into feat/creator-tokens-invite-system
hirbod Nov 1, 2023
609253a
Merge branch 'staging' into feat/creator-tokens-invite-system
hirbod Nov 1, 2023
6cb1809
Merge branch 'staging' into feat/creator-tokens-invite-system
hirbod Nov 5, 2023
c608cfe
feat(wip): opt-in/redeem code API
hirbod Nov 5, 2023
3eb51b9
feat(wip): redeem invite code API responses
hirbod Nov 5, 2023
b09c70f
fix: only show invite token input when no token was created
hirbod Nov 5, 2023
814f827
Merge branch 'staging' into feat/creator-tokens-invite-system
hirbod Nov 6, 2023
3dd6ff1
Merge branch 'staging' into feat/creator-tokens-invite-system
hirbod Nov 7, 2023
b972886
Merge branch 'staging' into feat/creator-tokens-invite-system
hirbod Nov 7, 2023
68b3bdc
fix: add loading state and graphic to invite modal
hirbod Nov 7, 2023
b8bf908
Merge branch 'staging' into feat/creator-tokens-invite-system
hirbod Nov 8, 2023
5ad5022
fix: profile
hirbod Nov 8, 2023
7b0a90d
Merge branch 'staging' into feat/creator-tokens-invite-system
hirbod Nov 8, 2023
6822053
Merge branch 'staging' into feat/creator-tokens-invite-system
hirbod Nov 20, 2023
8ee4b50
fix: web
hirbod Nov 20, 2023
3a58f8f
feat: add invite gift button
hirbod Nov 20, 2023
e18dbca
fix: usernames can contain periods now, fix edit profile
hirbod Nov 20, 2023
3d4361f
Add router functionality and update error messages
hirbod Nov 20, 2023
be6ecd2
Update profile-top styles to adjust padding
hirbod Nov 20, 2023
3137709
Fix conditional rendering in profile component
hirbod Nov 20, 2023
fe4f234
Refactor profile web component
hirbod Nov 20, 2023
c9c6522
Add UserContext import and useContext hook to
hirbod Nov 20, 2023
addb300
Merge branch 'staging' into feat/creator-tokens-invite-system
hirbod Nov 20, 2023
e8c90e2
feat: Add OTP input component and styles
hirbod Nov 20, 2023
c8d39fa
Merge branch 'staging' into feat/creator-tokens-invite-system
hirbod Nov 20, 2023
01a17c7
Add @gorhom/bottom-sheet package to transpile
hirbod Nov 20, 2023
bf7647a
Refactor invite-creator-token component
hirbod Nov 20, 2023
a71a07e
Add dark mode support to EnterInviteCodeModal
hirbod Nov 20, 2023
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
1 change: 1 addition & 0 deletions apps/next/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ const nextConfig = {
"expo-document-picker",
"react-native-compressor",
"expo-sharing",
"@gorhom/bottom-sheet",
],
webpack: (config, options) => {
if (!options.isServer) {
Expand Down
244 changes: 0 additions & 244 deletions packages/app/components/creator-token/assets/invite.tsx

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import useSWR from "swr";

import { fetcher } from "app/hooks/use-infinite-list-query";

export type AvailableCreatorTokensInviteCodes = {
code: string;
}[];

export type RedeemedCreatorTokensInviteCodes = {
invitee: {
username: string;
id: number;
};
redeemed_at: string;
}[];

export const useAvailableCreatorTokensInvites = () => {
const queryState = useSWR<AvailableCreatorTokensInviteCodes>(
"/v1/creator-token/invitations/available?limit=3&page=1",
fetcher,
{
focusThrottleInterval: 5000,
dedupingInterval: 5000,
revalidateIfStale: false,
}
);

return queryState;
};

export const useRedeemedCreatorTokensInvites = () => {
const queryState = useSWR<RedeemedCreatorTokensInviteCodes>(
"/v1/creator-token/invitations/redeemed?limit=10&page=1",
fetcher,
{
focusThrottleInterval: 5000,
dedupingInterval: 5000,
revalidateIfStale: false,
}
);

return queryState;
};
Loading
Loading