We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 31a5ba5 commit 5706d1dCopy full SHA for 5706d1d
apps/registry/app/pathways/components/WhyMatch.js
@@ -19,8 +19,14 @@ export default function WhyMatch({ job, compact = false }) {
19
const [error, setError] = useState(null);
20
const [isExpanded, setIsExpanded] = useState(false);
21
22
- // Check for cached insights on mount
+ // Reset state and check for cached insights when job changes
23
useEffect(() => {
24
+ // Reset state when job changes
25
+ setInsights(null);
26
+ setIsLoading(false);
27
+ setError(null);
28
+ setIsExpanded(false);
29
+
30
if (!effectiveUserId || !job?.id) return;
31
32
const checkCache = async () => {
0 commit comments