diff --git a/apps/frontend/src/components/onboarding/onboarding.tsx b/apps/frontend/src/components/onboarding/onboarding.tsx index ad03dd15..3b869da2 100644 --- a/apps/frontend/src/components/onboarding/onboarding.tsx +++ b/apps/frontend/src/components/onboarding/onboarding.tsx @@ -9,6 +9,7 @@ import { SettingsPopup } from '@gitroom/frontend/components/layout/settings.comp import { Button } from '@gitroom/react/form/button'; import { ConnectChannels } from '@gitroom/frontend/components/onboarding/connect.channels'; import { isGeneral } from '@gitroom/react/helpers/is.general'; +import { AddAccount } from '@gitroom/frontend/components/marketplace/seller'; export const Step: FC<{ step: number; @@ -114,6 +115,8 @@ const SkipOnboarding: FC = () => { ); }; const Welcome: FC = () => { + const [seller, setSeller] = useState(false); + const [lastStep, setLastStep] = useState(isGeneral() ? 3 : 4); const [step, setStep] = useState(1); const ref = useRef(); const router = useRouter(); @@ -128,7 +131,7 @@ const Welcome: FC = () => { const firstNext = useCallback(() => { // @ts-ignore ref?.current?.click(); - nextStep(isGeneral() ? 3 : 2)(); + nextStep(2)(); }, [nextStep]); const goToAnalytics = useCallback(() => { @@ -139,11 +142,25 @@ const Welcome: FC = () => { router.push('/launches'); }, []); + const buyPosts = useCallback(() => { + router.push('/marketplace/buyer'); + }, []); + + const sellPosts = useCallback(() => { + nextStep()(); + setLastStep(isGeneral() ? 4 : 5); + setSeller(true); + }, [step]); + + const connectBankAccount = useCallback(() => { + router.push('/marketplace/seller'); + }, []); + return (

Onboarding

- + {!isGeneral() && ( <> @@ -158,12 +175,23 @@ const Welcome: FC = () => { )} - + + {seller && ( + <> + + + + )}
{step === 1 && ( <> @@ -176,45 +204,58 @@ const Welcome: FC = () => {
)} - {step === 2 && ( + {step === 2 && !isGeneral() && (
- +
)} - {step === 3 && ( + {step === 3 - (isGeneral() ? 1 : 0) && (
- +
)} - {step === 4 && ( + {step === 4 - (isGeneral() ? 1 : 0) && (
success
- You are done, you can now video your GitHub analytics or -
- schedule new posts + You are done, from here you can:
-
- {!isGeneral() && ( - - )} - +
+
+ {!isGeneral() && ( + + )} + +
+ +
+ + +
+
+
+ )} + {step === 5 - (isGeneral() ? 1 : 0) && ( +
+
To sell posts you would have to:
+ + +
+ +
)} diff --git a/libraries/nestjs-libraries/src/database/prisma/marketplace/tags.list.ts b/libraries/nestjs-libraries/src/database/prisma/marketplace/tags.list.ts index 8d1a43fc..0d4faded 100644 --- a/libraries/nestjs-libraries/src/database/prisma/marketplace/tags.list.ts +++ b/libraries/nestjs-libraries/src/database/prisma/marketplace/tags.list.ts @@ -1,111 +1,138 @@ -export const tagsList = [ - { - key: 'services', - name: 'Services', - options: [ - { - key: 'content-writer', - value: 'Content Writer' - }, - { - key: 'influencers', - value: 'Influencers' - } - ] - }, - { - key: 'niches', - name: 'Niches', - options: [ - { - key: 'kubernetes', - value: 'Kubernetes' - }, - { - key: 'fullstack', - value: 'Fullstack' - }, - { - key: 'security', - value: 'Security' - }, - { - key: 'infrastructure', - value: 'Infrastructure' - }, - { - key: 'productivity', - value: 'Productivity' - }, - { - key: 'web3', - value: 'Web3' - }, - { - key: 'cloud-native', - value: 'Cloud Native' - }, - { - key: 'ml', - value: 'ML' - } - ] - }, - { - key: 'technologies', - name: 'Technologies', - options: [ - { - key: 'html', - value: 'HTML' - }, - { - key: 'css', - value: 'CSS' - }, - { - key: 'javascript', - value: 'JavaScript' - }, - { - key: 'typescript', - value: 'TypeScript' - }, - { - key: 'rust', - value: 'Rust' - }, - { - key: 'go', - value: 'Go' - }, - { - key: 'python', - value: 'Python' - }, - { - key: 'java', - value: 'Java' - }, - { - key: 'php', - value: 'PHP' - }, - { - key: 'ruby', - value: 'Ruby' - }, - { - key: 'c', - value: 'C/C++' - } - ] - } -]; +export const tagsList = + process.env.isGeneral === 'true' + ? [ + { + key: 'services', + name: 'Niches', + options: [ + { key: 'real-estate', value: 'Real Estate' }, + { key: 'fashion', value: 'Fashion' }, + { key: 'health-and-fitness', value: 'Health and Fitness' }, + { key: 'beauty', value: 'Beauty' }, + { key: 'travel', value: 'Travel' }, + { key: 'food', value: 'Food' }, + { key: 'tech', value: 'Tech' }, + { key: 'gaming', value: 'Gaming' }, + { key: 'parenting', value: 'Parenting' }, + { key: 'education', value: 'Education' }, + { key: 'business', value: 'Business' }, + { key: 'finance', value: 'Finance' }, + { key: 'diy', value: 'DIY' }, + { key: 'pets', value: 'Pets' }, + { key: 'lifestyle', value: 'Lifestyle' }, + { key: 'sports', value: 'Sports' }, + { key: 'entertainment', value: 'Entertainment' }, + { key: 'art', value: 'Art' }, + { key: 'photography', value: 'Photography' }, + { key: 'sustainability', value: 'Sustainability' }, + ], + }, + ] + : [ + { + key: 'services', + name: 'Services', + options: [ + { + key: 'content-writer', + value: 'Content Writer', + }, + { + key: 'influencers', + value: 'Influencers', + }, + ], + }, + { + key: 'niches', + name: 'Niches', + options: [ + { + key: 'kubernetes', + value: 'Kubernetes', + }, + { + key: 'fullstack', + value: 'Fullstack', + }, + { + key: 'security', + value: 'Security', + }, + { + key: 'infrastructure', + value: 'Infrastructure', + }, + { + key: 'productivity', + value: 'Productivity', + }, + { + key: 'web3', + value: 'Web3', + }, + { + key: 'cloud-native', + value: 'Cloud Native', + }, + { + key: 'ml', + value: 'ML', + }, + ], + }, + { + key: 'technologies', + name: 'Technologies', + options: [ + { + key: 'html', + value: 'HTML', + }, + { + key: 'css', + value: 'CSS', + }, + { + key: 'javascript', + value: 'JavaScript', + }, + { + key: 'typescript', + value: 'TypeScript', + }, + { + key: 'rust', + value: 'Rust', + }, + { + key: 'go', + value: 'Go', + }, + { + key: 'python', + value: 'Python', + }, + { + key: 'java', + value: 'Java', + }, + { + key: 'php', + value: 'PHP', + }, + { + key: 'ruby', + value: 'Ruby', + }, + { + key: 'c', + value: 'C/C++', + }, + ], + }, + ]; export const allTagsOptions = tagsList.reduce((acc, tag) => { - return [ - ...acc, - ...tag.options - ] -}, [] as Array<{key: string, value: string}>); \ No newline at end of file + return [...acc, ...tag.options]; +}, [] as Array<{ key: string; value: string }>);