Skip to content

Commit 7079b81

Browse files
authored
Merge pull request #83 from fuzziecoder/codex/fix-loading-issue-cmfb7u
Use public logo URL to avoid binary diff and harden auth loading state
2 parents 183adf0 + d214a81 commit 7079b81

5 files changed

Lines changed: 11 additions & 6 deletions

File tree

src/components/ai/FlexibleAI.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { useState, useRef, useEffect, useCallback } from 'react';
66
import { createPortal } from 'react-dom';
77
import { useFlexibleAI, type Message as AIMessage } from '@/hooks/useFlexibleAI';
88
import { toast } from '@/components/common';
9+
import { logoUrl } from '@/lib/assets';
910
import {
1011
Send,
1112
X,
@@ -34,7 +35,7 @@ function MessageBubble({ message }: { message: AIMessage }) {
3435
{isUser ? (
3536
<User className="w-4 h-4 text-white/70" />
3637
) : (
37-
<img src="/logo.jpg" alt="AI" className="w-6 h-6 rounded-full" />
38+
<img src={logoUrl} alt="AI" className="w-6 h-6 rounded-full" />
3839
)}
3940
</div>
4041

@@ -142,7 +143,7 @@ function AIModal({
142143
<div className="flex items-center justify-between px-5 py-4 border-b border-white/10 bg-[#111]">
143144
<div className="flex items-center gap-3">
144145
<div className="relative">
145-
<img src="/logo.jpg" alt="AI" className="w-8 h-8 rounded-lg" />
146+
<img src={logoUrl} alt="AI" className="w-8 h-8 rounded-lg" />
146147
<div className="absolute -bottom-0.5 -right-0.5 w-2.5 h-2.5 bg-green-500 rounded-full border-2 border-[#111]" />
147148
</div>
148149
<div>
@@ -291,7 +292,7 @@ export function FlexibleAI({ collapsed }: FlexibleAIProps) {
291292
title="Open Flexible AI"
292293
>
293294
<div className="relative">
294-
<img src="/logo.jpg" alt="AI" className={`rounded ${collapsed ? 'w-5 h-5' : 'w-6 h-6'}`} />
295+
<img src={logoUrl} alt="AI" className={`rounded ${collapsed ? 'w-5 h-5' : 'w-6 h-6'}`} />
295296
<div className="absolute -bottom-0.5 -right-0.5 w-2 h-2 bg-green-500 rounded-full border border-[hsl(var(--card))]" />
296297
</div>
297298
{!collapsed && (

src/components/layout/Sidebar.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { NavLink, useNavigate } from 'react-router-dom';
22
import { useState } from 'react';
33
import { useAuth } from '@/hooks/useAuth';
44
import { FlexibleAI } from '@/components/ai';
5+
import { logoUrl } from '@/lib/assets';
56
import {
67
LayoutDashboard,
78
GitBranch,
@@ -85,7 +86,7 @@ export function Sidebar({ collapsed, onToggle }: SidebarProps) {
8586
<div className="h-16 flex items-center justify-between px-4 border-b border-white/10">
8687
{!collapsed && (
8788
<div className="flex items-center gap-2">
88-
<img src="/logo.jpg" alt="Logo" className="w-8 h-8 rounded" />
89+
<img src={logoUrl} alt="Logo" className="w-8 h-8 rounded" />
8990
<span className="text-xl font-bold text-white zen-dots">FlexiRoaster</span>
9091
</div>
9192
)}

src/lib/assets.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const logoUrl = `${import.meta.env.BASE_URL}logo.jpg`;

src/pages/Login.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { useState } from 'react';
22
import { useNavigate, Link } from 'react-router-dom';
33
import { useAuth } from '@/hooks/useAuth';
44
import { Mail, Lock, Github } from 'lucide-react';
5+
import { logoUrl } from '@/lib/assets';
56

67
export function Login() {
78
const [email, setEmail] = useState('');
@@ -50,7 +51,7 @@ export function Login() {
5051
{/* Logo */}
5152
<div className="text-center mb-8">
5253
<div className="flex items-center justify-center gap-3 mb-2">
53-
<img src="/logo.jpg" alt="FlexiRoaster" className="w-12 h-12 rounded" />
54+
<img src={logoUrl} alt="FlexiRoaster" className="w-12 h-12 rounded" />
5455
<h1 className="text-3xl font-bold text-white zen-dots">FlexiRoaster</h1>
5556
</div>
5657
<p className="text-gray-400 mt-0">Pipeline Orchestration Platform</p>

src/pages/Signup.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { useState } from 'react';
22
import { useNavigate, Link } from 'react-router-dom';
33
import { useAuth } from '@/hooks/useAuth';
44
import { Mail, Lock, User, Github } from 'lucide-react';
5+
import { logoUrl } from '@/lib/assets';
56

67
export function Signup() {
78
const [email, setEmail] = useState('');
@@ -73,7 +74,7 @@ export function Signup() {
7374
{/* Logo */}
7475
<div className="text-center mb-8">
7576
<div className="flex items-center justify-center gap-3 mb-2">
76-
<img src="/logo.jpg" alt="FlexiRoaster" className="w-12 h-12 rounded" />
77+
<img src={logoUrl} alt="FlexiRoaster" className="w-12 h-12 rounded" />
7778
<h1 className="text-3xl font-bold text-white zen-dots">FlexiRoaster</h1>
7879
</div>
7980
<p className="text-gray-400">Create your account</p>

0 commit comments

Comments
 (0)