Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion app/api/session/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,14 @@ async function createSession(timezone?: string) {
apiKey: process.env.BROWSERBASE_API_KEY!,
});

const config = await getAll<EdgeConfig>();
let config: Partial<EdgeConfig> = {};
try {
config = (await getAll<EdgeConfig>()) || {};
} catch {
console.log(
"EDGE_CONFIG not found or invalid, using default configuration."
);
}

const {
advancedStealth: advancedStealthConfig,
Expand Down
28 changes: 26 additions & 2 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,41 @@ const Tooltip = ({
text: string;
}) => {
const [isHovered, setIsHovered] = useState(false);
const timeoutRef = useRef<NodeJS.Timeout | null>(null);

const handleMouseEnter = () => {
if (timeoutRef.current) {
clearTimeout(timeoutRef.current);
}
setIsHovered(true);
};

const handleMouseLeave = () => {
timeoutRef.current = setTimeout(() => {
setIsHovered(false);
}, 200);
};

useEffect(() => {
return () => {
if (timeoutRef.current) {
clearTimeout(timeoutRef.current);
}
};
}, []);

return (
<div
className="relative"
onMouseEnter={() => setIsHovered(true)}
onMouseLeave={() => setIsHovered(false)}
onMouseEnter={handleMouseEnter}
onMouseLeave={handleMouseLeave}
>
{children}
<AnimatePresence>
{isHovered && (
<motion.span
onMouseEnter={handleMouseEnter}
onMouseLeave={handleMouseLeave}
initial={{ opacity: 0, y: 10, scale: 0.9 }}
animate={{ opacity: 1, y: 3, scale: 1 }}
exit={{ opacity: 0, y: 10, scale: 0.9 }}
Expand Down