Newer
Older
taehui / qwilight-fe / src / app / Qwilight.zip / components / UAData.tsx
@taehui taehui on 23 Aug 542 bytes v1.0.0
"use client";

import { useEffect } from "react";

export default function UAData() {
  useEffect(() => {
    (async () => {
      const { architecture } =
        await window.navigator.userAgentData.getHighEntropyValues([
          "architecture",
        ]);
      switch (architecture) {
        case "arm":
          window.location.href = "/qwilight/Qwilight.ARM64.zip";
          break;
        case "x86":
          window.location.href = "/qwilight/Qwilight.AMD64.zip";
          break;
      }
    })();
  }, []);

  return null;
}