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
3 changes: 0 additions & 3 deletions restaurant-comparison-tool/.eslintrc.json

This file was deleted.

16 changes: 16 additions & 0 deletions restaurant-comparison-tool/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { dirname } from "path";
import { fileURLToPath } from "url";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

const compat = new FlatCompat({
baseDirectory: __dirname,
});

const eslintConfig = [
...compat.extends("next/core-web-vitals"),
];

export default eslintConfig;
1 change: 1 addition & 0 deletions restaurant-comparison-tool/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions restaurant-comparison-tool/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"tailwind-merge": "^3.4.0"
},
"devDependencies": {
"@eslint/eslintrc": "^3.3.5",
"@tailwindcss/postcss": "^4.1.18",
"@types/node": "^24",
"@types/react": "^19",
Expand Down
16 changes: 16 additions & 0 deletions scholarship-finder/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { dirname } from "path";
import { fileURLToPath } from "url";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

const compat = new FlatCompat({
baseDirectory: __dirname,
});

const eslintConfig = [
...compat.extends("next/core-web-vitals", "next/typescript"),
];

export default eslintConfig;
1 change: 1 addition & 0 deletions scholarship-finder/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion scholarship-finder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
"lint": "eslint"
},
"dependencies": {
"@radix-ui/react-select": "^2.1.6",
Expand All @@ -22,6 +22,7 @@
"@google/generative-ai": "latest"
},
"devDependencies": {
"@eslint/eslintrc": "^3.3.5",
"@types/node": "^22.16.5",
"@types/react": "^18.3.23",
"@types/react-dom": "^18.3.7",
Expand Down
2 changes: 1 addition & 1 deletion scholarship-finder/src/components/CompareDashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export function CompareDashboard({ scholarships, onClose }: CompareDashboardProp
)
},
{ label: "Additional Info", icon: null, render: (s: Scholarship) => <span className="text-sm text-muted-foreground">{s.additionalInfo || "N/A"}</span> },
].map(({ label, icon, render }, idx) => (
].map(({ label, icon, render }) => (
<tr key={label} className="border-b border-muted">
<td className="p-4 font-semibold bg-orange-50 text-orange-900">
<div className="flex items-center gap-2">{icon}{label}</div>
Expand Down
3 changes: 1 addition & 2 deletions scholarship-finder/src/components/LoadingAnimation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ export function LoadingAnimation({ searchState }: LoadingAnimationProps) {
<AgentCard
key={agent.agentId}
agent={agent}
isExpanded={expandedAgent === agent.agentId}
onExpand={() => setExpandedAgent(expandedAgent === agent.agentId ? null : agent.agentId)}
/>
))}
Expand Down Expand Up @@ -137,7 +136,7 @@ export function LoadingAnimation({ searchState }: LoadingAnimationProps) {
);
}

function AgentCard({ agent, isExpanded, onExpand }: { agent: AgentStatus; isExpanded: boolean; onExpand: () => void }) {
function AgentCard({ agent, onExpand }: { agent: AgentStatus; onExpand: () => void }) {
const statusColors = {
pending: "border-muted-foreground/30",
running: "border-primary",
Expand Down
3 changes: 2 additions & 1 deletion scholarship-finder/src/components/SearchResults.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ export function SearchResults({ scholarships, searchSummary, searchParams }: Sea
const handleToggleSelect = (id: string) => {
setSelectedIds((prev) => {
const next = new Set(prev);
next.has(id) ? next.delete(id) : next.add(id);
if (next.has(id)) next.delete(id);
else next.add(id);
return next;
});
};
Expand Down
2 changes: 1 addition & 1 deletion scholarship-finder/src/hooks/useScholarshipSearch.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";

import { useState, useCallback } from "react";
import type { Scholarship, SearchParams, SearchResponse, SearchState } from "@/types/scholarship";
import type { SearchParams, SearchResponse, SearchState } from "@/types/scholarship";

const emptyState = (): SearchState => ({
step: 0,
Expand Down
3 changes: 2 additions & 1 deletion scholarship-finder/tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Config } from "tailwindcss";
import tailwindcssAnimate from "tailwindcss-animate";
const config: Config = {
darkMode: ["class"],
content: ["./src/**/*.{ts,tsx}"],
Expand Down Expand Up @@ -31,6 +32,6 @@ const config: Config = {
animation: { "fade-in": "fade-in 0.3s ease-out" },
},
},
plugins: [require("tailwindcss-animate")],
plugins: [tailwindcssAnimate],
};
export default config;
16 changes: 16 additions & 0 deletions summer-school-finder/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { dirname } from "path";
import { fileURLToPath } from "url";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

const compat = new FlatCompat({
baseDirectory: __dirname,
});

const eslintConfig = [
...compat.extends("next/core-web-vitals", "next/typescript"),
];

export default eslintConfig;
1 change: 1 addition & 0 deletions summer-school-finder/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion summer-school-finder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
"lint": "eslint"
},
"dependencies": {
"@radix-ui/react-checkbox": "^1.3.2",
Expand All @@ -26,6 +26,7 @@
"tailwindcss-animate": "^1.0.7"
},
"devDependencies": {
"@eslint/eslintrc": "^3.3.5",
"@types/node": "^22.16.5",
"@types/react": "^18.3.23",
"@types/react-dom": "^18.3.7",
Expand Down
3 changes: 2 additions & 1 deletion summer-school-finder/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ export default function Home() {
const handleSelect = (index: number, selected: boolean) => {
setSelectedIndices((prev) => {
const next = new Set(prev);
selected ? next.add(index) : next.delete(index);
if (selected) next.add(index);
else next.delete(index);
return next;
});
};
Expand Down
3 changes: 2 additions & 1 deletion summer-school-finder/tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Config } from "tailwindcss";
import tailwindcssAnimate from "tailwindcss-animate";

const config: Config = {
darkMode: ["class"],
Expand Down Expand Up @@ -63,7 +64,7 @@ const config: Config = {
},
},
},
plugins: [require("tailwindcss-animate")],
plugins: [tailwindcssAnimate],
};

export default config;
18 changes: 18 additions & 0 deletions tenders-finder/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { defineConfig, globalIgnores } from "eslint/config";
import nextVitals from "eslint-config-next/core-web-vitals";
import nextTs from "eslint-config-next/typescript";

const eslintConfig = defineConfig([
...nextVitals,
...nextTs,
// Override default ignores of eslint-config-next.
globalIgnores([
// Default ignores of eslint-config-next:
".next/**",
"out/**",
"build/**",
"next-env.d.ts",
]),
]);

export default eslintConfig;
2 changes: 1 addition & 1 deletion tenders-finder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
"lint": "eslint"
},
"dependencies": {
"@tiny-fish/sdk": "latest",
Expand Down
12 changes: 6 additions & 6 deletions tenders-finder/src/components/tender/AgentPreviewCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ interface AgentPreviewCardProps {

export function AgentPreviewCard({ agent, onExpandPreview }: AgentPreviewCardProps) {
const [shouldHide, setShouldHide] = useState(false);
const [iframeLoaded, setIframeLoaded] = useState(false);
const [loadedUrl, setLoadedUrl] = useState<string | null>(null);

// Derived rather than reset in an effect, so a new URL shows the placeholder
// again without a synchronising render pass.
const iframeLoaded = !!agent.streamingUrl && loadedUrl === agent.streamingUrl;

useEffect(() => {
if (agent.status === "complete" || agent.status === "error") {
Expand All @@ -21,10 +25,6 @@ export function AgentPreviewCard({ agent, onExpandPreview }: AgentPreviewCardPro
}
}, [agent.status]);

useEffect(() => {
if (agent.streamingUrl) setIframeLoaded(false);
}, [agent.streamingUrl]);

if (shouldHide) return null;

const getStatusIcon = () => {
Expand Down Expand Up @@ -102,7 +102,7 @@ export function AgentPreviewCard({ agent, onExpandPreview }: AgentPreviewCardPro
src={agent.streamingUrl}
className="w-full h-full border-0"
title={`Live preview for ${agent.name}`}
onLoad={() => setIframeLoaded(true)}
onLoad={() => setLoadedUrl(agent.streamingUrl ?? null)}
/>
{onExpandPreview && iframeLoaded && (
<button
Expand Down
10 changes: 6 additions & 4 deletions tenders-finder/src/components/tender/LiveBrowserModal.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"use client";
import { useState, useEffect } from "react";
import { useState } from "react";
import { motion, AnimatePresence } from "framer-motion";
import { X, Monitor, Maximize2, Minimize2, Loader2 } from "lucide-react";
import { cn } from "@/lib/utils";
Expand All @@ -13,9 +13,11 @@ interface LiveBrowserModalProps {

export function LiveBrowserModal({ isOpen, streamingUrl, platformName, onClose }: LiveBrowserModalProps) {
const [isFullscreen, setIsFullscreen] = useState(false);
const [isLoading, setIsLoading] = useState(true);
const [loadedUrl, setLoadedUrl] = useState<string | null>(null);

useEffect(() => { setIsLoading(true); }, [streamingUrl]);
// Derived rather than reset in an effect, so a new URL shows the spinner again
// without a synchronising render pass.
const isLoading = loadedUrl !== streamingUrl;

if (!isOpen) return null;

Expand Down Expand Up @@ -75,7 +77,7 @@ export function LiveBrowserModal({ isOpen, streamingUrl, platformName, onClose }
src={streamingUrl}
className="w-full h-full border-0"
title={`Live preview for ${platformName}`}
onLoad={() => setIsLoading(false)}
onLoad={() => setLoadedUrl(streamingUrl)}
/>
</div>
</motion.div>
Expand Down
3 changes: 2 additions & 1 deletion tenders-finder/src/hooks/useTenderSearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,8 @@ Return ONLY this JSON with no extra text:
const toggleTenderSelection = useCallback((tenderId: string) => {
setState((prev) => {
const newSelected = new Set(prev.selectedTenders);
newSelected.has(tenderId) ? newSelected.delete(tenderId) : newSelected.add(tenderId);
if (newSelected.has(tenderId)) newSelected.delete(tenderId);
else newSelected.add(tenderId);
return { ...prev, selectedTenders: newSelected };
});
}, []);
Expand Down
3 changes: 2 additions & 1 deletion tenders-finder/tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Config } from "tailwindcss";
import tailwindcssAnimate from "tailwindcss-animate";
const config: Config = {
darkMode: ["class"],
content: ["./src/**/*.{ts,tsx}"],
Expand All @@ -21,6 +22,6 @@ const config: Config = {
borderRadius: { lg: "var(--radius)", md: "calc(var(--radius) - 2px)", sm: "calc(var(--radius) - 4px)" },
},
},
plugins: [require("tailwindcss-animate")],
plugins: [tailwindcssAnimate],
};
export default config;
16 changes: 16 additions & 0 deletions tutor-finder/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { dirname } from "path";
import { fileURLToPath } from "url";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

const compat = new FlatCompat({
baseDirectory: __dirname,
});

const eslintConfig = [
...compat.extends("next/core-web-vitals", "next/typescript"),
];

export default eslintConfig;
1 change: 1 addition & 0 deletions tutor-finder/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion tutor-finder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
"lint": "eslint"
},
"dependencies": {
"@radix-ui/react-dialog": "^1.1.14",
Expand All @@ -28,6 +28,7 @@
"tailwindcss-animate": "^1.0.7"
},
"devDependencies": {
"@eslint/eslintrc": "^3.3.5",
"@types/node": "^22.16.5",
"@types/react": "^18.3.23",
"@types/react-dom": "^18.3.7",
Expand Down
3 changes: 1 addition & 2 deletions tutor-finder/src/components/TutorCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import {
TrendingUp,
ExternalLink,
Check,
Monitor,
BookOpen
Monitor
} from 'lucide-react';
import { Badge } from '@/components/ui/badge';
import { cn } from '@/lib/utils';
Expand Down
5 changes: 3 additions & 2 deletions tutor-finder/src/hooks/useTutorSearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ export function useTutorSearch() {
const toggleTutorSelection = (tutorId: string) => {
setState((prev) => {
const next = new Set(prev.selectedTutorIds);
next.has(tutorId) ? next.delete(tutorId) : next.add(tutorId);
if (next.has(tutorId)) next.delete(tutorId);
else next.add(tutorId);
return { ...prev, selectedTutorIds: next };
});
};
Expand Down Expand Up @@ -152,7 +153,7 @@ export function useTutorSearch() {
} catch { /* ignore parse errors */ }
}
}
} catch (error) {
} catch {
setState((prev) => ({
...prev,
agents: prev.agents.map((a) =>
Expand Down
Loading