• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

nilfalse / ctf / 5752977660

pending completion
5752977660

Pull #298

github

web-flow
Merge b6f7f6972 into da4e6f9f9
Pull Request #298: Update all of jest 27.5.1 → 29.6.2 (major)

0 of 266 branches covered (0.0%)

Branch coverage included in aggregate %.

0 of 613 relevant lines covered (0.0%)

0.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/packages/runtime/view/hooks/query_params.ts
1
import { parse, ParsedUrlQuery } from 'querystring';
2

3
import { useEffect, useState } from 'react';
4

5
export function useQueryParams() {
6
  const [queryParams, setQueryParams] = useState<ParsedUrlQuery>({});
×
7

8
  useEffect(() => {
×
9
    function handlePopState() {
10
      setQueryParams(parse(location.search.substring(1)));
×
11
    }
12

13
    handlePopState();
×
14

15
    window.addEventListener('popstate', handlePopState);
×
16
    return () => window.removeEventListener('popstate', handlePopState);
×
17
  }, []);
18

19
  return queryParams;
×
20
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc