stillerman commited on
Commit
7a7f75f
·
1 Parent(s): ad056e1

Small screen warning, qwen default

Browse files
Files changed (2) hide show
  1. src/App.tsx +23 -1
  2. src/components/play-tab.tsx +1 -1
src/App.tsx CHANGED
@@ -3,13 +3,29 @@ import ViewerTab from "@/components/viewer-tab";
3
  import PlayTab from "@/components/play-tab";
4
  import AboutTab from "@/components/about-tab";
5
  import { SignInWithHuggingFaceButton } from "@/components/sign-in-with-hf-button";
6
- import { useState } from "react";
7
 
8
  export default function Home() {
9
  const [selectedTab, setSelectedTab] = useState<"view" | "play" | "about">("view");
10
  const [startArticle, setStartArticle] = useState<string>("");
11
  const [destinationArticle, setDestinationArticle] = useState<string>("");
 
12
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  const handleTryRun = (startArticle: string, destinationArticle: string) => {
14
  console.log("Trying run from", startArticle, "to", destinationArticle);
15
  setSelectedTab("play");
@@ -19,6 +35,12 @@ export default function Home() {
19
 
20
  return (
21
  <div className="container mx-auto p-4">
 
 
 
 
 
 
22
  <div className="flex flex-row justify-between">
23
  <h1 className="text-3xl font-bold mb-6">WikiRacing Language Models</h1>
24
  <SignInWithHuggingFaceButton />
 
3
  import PlayTab from "@/components/play-tab";
4
  import AboutTab from "@/components/about-tab";
5
  import { SignInWithHuggingFaceButton } from "@/components/sign-in-with-hf-button";
6
+ import { useState, useEffect } from "react";
7
 
8
  export default function Home() {
9
  const [selectedTab, setSelectedTab] = useState<"view" | "play" | "about">("view");
10
  const [startArticle, setStartArticle] = useState<string>("");
11
  const [destinationArticle, setDestinationArticle] = useState<string>("");
12
+ const [isSmallScreen, setIsSmallScreen] = useState<boolean>(false);
13
 
14
+ useEffect(() => {
15
+ const checkScreenSize = () => {
16
+ setIsSmallScreen(window.innerWidth < 768);
17
+ };
18
+
19
+ // Check on initial load
20
+ checkScreenSize();
21
+
22
+ // Add resize listener
23
+ window.addEventListener('resize', checkScreenSize);
24
+
25
+ // Clean up
26
+ return () => window.removeEventListener('resize', checkScreenSize);
27
+ }, []);
28
+
29
  const handleTryRun = (startArticle: string, destinationArticle: string) => {
30
  console.log("Trying run from", startArticle, "to", destinationArticle);
31
  setSelectedTab("play");
 
35
 
36
  return (
37
  <div className="container mx-auto p-4">
38
+ {isSmallScreen && (
39
+ <div className="bg-yellow-100 border-l-4 border-yellow-500 text-yellow-700 p-4 mb-4 rounded shadow">
40
+ <p className="font-bold">Warning:</p>
41
+ <p>This application doesn't work well on small screens. Please use a desktop for the best experience.</p>
42
+ </div>
43
+ )}
44
  <div className="flex flex-row justify-between">
45
  <h1 className="text-3xl font-bold mb-6">WikiRacing Language Models</h1>
46
  <SignInWithHuggingFaceButton />
src/components/play-tab.tsx CHANGED
@@ -37,7 +37,7 @@ export default function PlayTab({
37
  }) {
38
  const [player, setPlayer] = useState<"me" | "model">("model");
39
  const [selectedModel, setSelectedModel] = useState<string | undefined>(
40
- "deepseek-ai/DeepSeek-V3-0324"
41
  );
42
  const [maxHops, setMaxHops] = useState<number>(20);
43
  const [isGameStarted, setIsGameStarted] = useState<boolean>(false);
 
37
  }) {
38
  const [player, setPlayer] = useState<"me" | "model">("model");
39
  const [selectedModel, setSelectedModel] = useState<string | undefined>(
40
+ "Qwen/Qwen3-30B-A3B"
41
  );
42
  const [maxHops, setMaxHops] = useState<number>(20);
43
  const [isGameStarted, setIsGameStarted] = useState<boolean>(false);