File size: 346 Bytes
ddf672c
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { useLocation } from "react-router-dom";
import { InfiniteBackground } from "./InfiniteBackground";

export function AppBackground() {
  const location = useLocation();
  const isGameRoute =
    location.pathname === "/game" || location.pathname === "/debug";

  if (isGameRoute) {
    return null;
  }

  return <InfiniteBackground />;
}