Skip to content

Commit

Permalink
magic stuff happened
Browse files Browse the repository at this point in the history
  • Loading branch information
NeoPrint3D committed Sep 21, 2022
1 parent a0961fa commit e30fa56
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 6 deletions.
4 changes: 4 additions & 0 deletions react-client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
<link rel="icon" href="/favicon.ico" type="image/x-icon" />
<link rel="apple-touch-icon" href="/favicon.ico" />
<meta name="theme-color" content="#023047" />
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Crete+Round&display=swap"
/>

<script type="module">
import { registerSW } from "virtual:pwa-register";
Expand Down
1 change: 1 addition & 0 deletions react-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"vite-plugin-pwa": "^0.12.0",
"vite-plugin-qrcode": "^0.1.1",
"vite-plugin-remove-console": "^1.1.0",
"vite-plugin-webfont-dl": "^3.1.1",
"workbox-window": "^6.5.4"
}
}
21 changes: 21 additions & 0 deletions react-client/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion react-client/src/components/GameRoom/Keyboard/Key.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { m } from "framer-motion";
import { memo, useCallback, useContext } from "react";
import { useWindowSize } from "react-use";
import { useKeyboard, useGuesses } from "../../../context/GameContext";
import { CharStatus } from "../../Grid/utils/getStatuses";
import { CharStatus } from "../Grid/utils/getStatuses";

function Key({ value, status }: { value?: string, status?: CharStatus, socket?: any }) {
const { width } = useWindowSize()
Expand Down
4 changes: 2 additions & 2 deletions react-client/src/components/GameRoom/Keyboard/Keyboard.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { m } from "framer-motion";
import { memo, useCallback, useEffect, useState } from "react";
import { useGuesses, useKeyboard } from "../../../context/GameContext";
import { CharStatus } from "../../Grid/utils/getStatuses";
import { m } from "framer-motion";
import { CharStatus } from "../Grid/utils/getStatuses";
import Key from "./Key";

function Keyboard({ answer, handleEnter, hasGuessed }: { answer: string, handleEnter: any, hasGuessed: boolean }) {
Expand Down
2 changes: 0 additions & 2 deletions react-client/src/styles/global.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@import url("https://fonts.googleapis.com/css2?family=Crete+Round&display=swap");

@tailwind base;
@tailwind components;
@tailwind utilities;
Expand Down
6 changes: 5 additions & 1 deletion react-client/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { defineConfig } from "vite";
import { VitePWA } from "vite-plugin-pwa";
import removeConsole from "vite-plugin-remove-console";
import webfontDownload from "vite-plugin-webfont-dl";

//@ts-ignore
import manifest from "./manifest.json";
Expand All @@ -11,12 +12,15 @@ import react from "@vitejs/plugin-react";
export default defineConfig({
plugins: [
react(),
removeConsole(),
webfontDownload([
"https://fonts.googleapis.com/css2?family=Crete+Round&display=swap",
]),
VitePWA({
strategies: "injectManifest",
srcDir: "",
filename: "service-worker.js",
manifest,
}),
removeConsole(),
],
});

0 comments on commit e30fa56

Please sign in to comment.