Skip to content

Commit

Permalink
[autofix.ci] apply automated fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
autofix-ci[bot] authored Mar 4, 2025
1 parent 6fc6f1b commit 5ac39b3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 20 deletions.
27 changes: 11 additions & 16 deletions frontend/src/app/(main)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,17 @@ export default function HomePage() {
if (!message.trim()) return;

try {
// Create the project
const result = await createProjectFromPrompt(message, isPublic, model);
// Create the project
const result = await createProjectFromPrompt(message, isPublic, model);

// If successful, clear the input
if (result) {
promptFormRef.current.clearMessage();
// If successful, clear the input
if (result) {
promptFormRef.current.clearMessage();

// Note: No need to navigate here as the ProjectContext's onCompleted handler
// in the createProject mutation will handle navigation to the chat page
}} catch (error) {
// Note: No need to navigate here as the ProjectContext's onCompleted handler
// in the createProject mutation will handle navigation to the chat page
}
} catch (error) {
console.error('Error creating project:', error);
}
};
Expand Down Expand Up @@ -106,14 +107,8 @@ export default function HomePage() {
/>

{/* SignInModal & SignUpModal */}
<SignInModal
isOpen={showSignIn}
onClose={() => setShowSignIn(false)}
/>
<SignUpModal
isOpen={showSignUp}
onClose={() => setShowSignUp(false)}
/>
<SignInModal isOpen={showSignIn} onClose={() => setShowSignIn(false)} />
<SignUpModal isOpen={showSignUp} onClose={() => setShowSignUp(false)} />

<style jsx global>{`
.animate-pulse-subtle {
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/root/nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ const FloatingNavbar = forwardRef<NavbarRef, FloatingNavbarProps>(
e.preventDefault();
alert('Coming Soon');
} else if (label === 'Codefox Journey') {
e.preventDefault();
alert('Coming Soon');
e.preventDefault();
alert('Coming Soon');
} else {
handleTabChange(index);
}
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/sign-in-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ export function SignInModal({ isOpen, onClose }: SignInModalProps) {
if (data?.login) {
// Store tokens where desired (session storage for access, local for refresh)
login(data.login.accessToken, data.login.refreshToken);
toast.success('Login successful!',{
position: 'bottom-right'
toast.success('Login successful!', {
position: 'bottom-right',
});
setErrorMessage(null);
onClose(); // Close the modal
Expand Down

0 comments on commit 5ac39b3

Please sign in to comment.