Skip to content

Commit

Permalink
address some feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
SheepTester committed Sep 28, 2024
1 parent 28274cd commit 282f5e2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/components/layout/Navbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import styles from './style.module.scss';

interface NavbarProps {
accessType?: UserAccessType;
/** Used on the onboarding screen to avoid a distracting double rainbow */
quiet?: boolean;
}
const Navbar = ({ accessType, quiet }: NavbarProps) => {
Expand Down
18 changes: 11 additions & 7 deletions src/components/onboarding/OnboardingScreen/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { Button, Typography } from '@/components/common';
import { Button, LinkButton, Typography } from '@/components/common';
import Communities from '@/components/onboarding/Communities';
import Intro from '@/components/onboarding/Intro';
import { CollectionSlider } from '@/components/store';
import { config } from '@/lib';
import Step4 from '@/public/assets/graphics/store/step4.svg';
import { ReactNode, useState } from 'react';
import { AiOutlineClockCircle } from 'react-icons/ai';
Expand Down Expand Up @@ -56,8 +57,7 @@ const steps: Step[] = [
},
{
title: 'That’s a glimpse on how we run ACM at UCSD.',
caption:
'Let’s get started with setting up your account! You can earn your first 10 points by completing the tasks under the profile dashboard. ',
caption: 'Let’s get started with setting up your account!', // You can earn your first 10 points by completing the tasks under the profile dashboard.
content: <Step4 className={styles.endImage} />,
},
];
Expand All @@ -66,7 +66,7 @@ const TOTAL_STEPS = steps.length - 1;

interface OnboardingScreenProps {
onDismiss: () => void;
onFinish: () => void;
onFinish?: () => void;
}

const OnboardingScreen = ({ onDismiss, onFinish }: OnboardingScreenProps) => {
Expand Down Expand Up @@ -103,9 +103,13 @@ const OnboardingScreen = ({ onDismiss, onFinish }: OnboardingScreenProps) => {
>
{step > 0 ? 'Back' : 'Maybe later'}
</Button>
<Button onClick={step < steps.length - 1 ? () => setStep(step => step + 1) : onFinish}>
{step < steps.length - 1 ? 'Next' : 'Finish'}
</Button>
{!onFinish && step === steps.length - 1 ? (
<LinkButton href={config.profile.editRoute}>Finish</LinkButton>
) : (
<Button onClick={step < steps.length - 1 ? () => setStep(step => step + 1) : onFinish}>
{step < steps.length - 1 ? 'Next' : 'Finish'}
</Button>
)}
</div>
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion src/pages/onboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const OnboardPage: NextPage<OnboardProps> = ({ destination }) => {

return (
<div style={{ minHeight: 'calc(100vh - 8.25rem)', display: 'flex', flexDirection: 'column' }}>
<OnboardingScreen onDismiss={handleExit} onFinish={handleExit} />
<OnboardingScreen onDismiss={handleExit} />
</div>
);
};
Expand Down

0 comments on commit 282f5e2

Please sign in to comment.