mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +00:00
Add login/signup call to action below index prompt. Re-use index prompt if user began typing before logging in.
This commit is contained in:
1 parent
ed21b3db8d
commit
f13c99de80
4 files changed
+91
-43
No files matched your search
@@ -13,6 +13,7 @@ interface OnboardingDialogProps {
|
||||
currentStep: number;
|
||||
onNextStep: () => void;
|
||||
onPreviousStep: () => void;
|
||||
initialPrompt?: string;
|
||||
}
|
||||
|
||||
const STEPS = [
|
||||
@@ -28,7 +29,8 @@ export function OnboardingDialog({
|
||||
onComplete,
|
||||
currentStep: propCurrentStep,
|
||||
onNextStep,
|
||||
onPreviousStep
|
||||
onPreviousStep,
|
||||
initialPrompt = ''
|
||||
}: OnboardingDialogProps) {
|
||||
const [localStep, setLocalStep] = useState(propCurrentStep);
|
||||
|
||||
@@ -88,6 +90,7 @@ export function OnboardingDialog({
|
||||
onPrevious={handlePrevious}
|
||||
onComplete={handleComplete}
|
||||
onProjectCreated={onProjectCreated}
|
||||
initialPrompt={initialPrompt}
|
||||
/>
|
||||
);
|
||||
default:
|
||||
|
||||
@@ -11,10 +11,11 @@ interface ProjectStepProps {
|
||||
onPrevious: () => void;
|
||||
onComplete: () => void;
|
||||
onProjectCreated?: (projectId: string) => void;
|
||||
initialPrompt?: string;
|
||||
}
|
||||
|
||||
export function ProjectStep({ onPrevious, onComplete, onProjectCreated }: ProjectStepProps) {
|
||||
const [prompt, setPrompt] = useState('');
|
||||
export function ProjectStep({ onPrevious, onComplete, onProjectCreated, initialPrompt = '' }: ProjectStepProps) {
|
||||
const [prompt, setPrompt] = useState(initialPrompt);
|
||||
const [isCreating, setIsCreating] = useState(false);
|
||||
const projectsManager = useProjectsManager();
|
||||
const navigate = useNavigate();
|
||||
|
||||
Reference in new issue
Block a user