From a6f9573c3fe22483eb2d9d3cad80f5c30ee7fd3f Mon Sep 17 00:00:00 2001 From: Liam <67254223+RealFascinated@users.noreply.github.com> Date: Sun, 23 Oct 2022 21:47:57 +0100 Subject: [PATCH] Moved pages and styles into src --- src/components/Avatar.js | 2 +- src/components/PlayerStats.js | 2 +- src/components/ScoreStats.js | 2 +- src/components/SongInfo.js | 2 +- {pages => src/pages}/404.js | 0 {pages => src/pages}/_app.js | 0 {pages => src/pages}/_document.js | 0 {pages => src/pages}/api/beatleader/stars.js | 8 ++++++-- {pages => src/pages}/api/beatsaver/map.js | 2 +- {pages => src/pages}/api/scoresaber/stars.js | 10 +++++++--- {pages => src/pages}/api/validateid.js | 2 +- {pages => src/pages}/index.js | 4 ++-- {pages => src/pages}/overlay.js | 10 +++++----- {styles => src/styles}/avatar.module.css | 0 {styles => src/styles}/globals.css | 0 {styles => src/styles}/main.module.css | 0 {styles => src/styles}/overlay.module.css | 0 {styles => src/styles}/playerStats.module.css | 0 {styles => src/styles}/scoreStats.module.css | 0 {styles => src/styles}/songInfo.module.css | 0 20 files changed, 26 insertions(+), 18 deletions(-) rename {pages => src/pages}/404.js (100%) rename {pages => src/pages}/_app.js (100%) rename {pages => src/pages}/_document.js (100%) rename {pages => src/pages}/api/beatleader/stars.js (91%) rename {pages => src/pages}/api/beatsaver/map.js (82%) rename {pages => src/pages}/api/scoresaber/stars.js (86%) rename {pages => src/pages}/api/validateid.js (82%) rename {pages => src/pages}/index.js (98%) rename {pages => src/pages}/overlay.js (97%) rename {styles => src/styles}/avatar.module.css (100%) rename {styles => src/styles}/globals.css (100%) rename {styles => src/styles}/main.module.css (100%) rename {styles => src/styles}/overlay.module.css (100%) rename {styles => src/styles}/playerStats.module.css (100%) rename {styles => src/styles}/scoreStats.module.css (100%) rename {styles => src/styles}/songInfo.module.css (100%) diff --git a/src/components/Avatar.js b/src/components/Avatar.js index 9c30747..8b1f0ca 100644 --- a/src/components/Avatar.js +++ b/src/components/Avatar.js @@ -1,6 +1,6 @@ import Image from "next/image"; -import styles from "../../styles/avatar.module.css"; +import styles from "../styles/avatar.module.css"; const Avatar = (props) => { return ( diff --git a/src/components/PlayerStats.js b/src/components/PlayerStats.js index 76f0f1a..6701fec 100644 --- a/src/components/PlayerStats.js +++ b/src/components/PlayerStats.js @@ -1,6 +1,6 @@ import ReactCountryFlag from "react-country-flag"; -import styles from "../../styles/playerStats.module.css"; +import styles from "../styles/playerStats.module.css"; import Avatar from "./Avatar"; const PlayerStats = (props) => { diff --git a/src/components/ScoreStats.js b/src/components/ScoreStats.js index e9dfab5..99b5dcd 100644 --- a/src/components/ScoreStats.js +++ b/src/components/ScoreStats.js @@ -1,6 +1,6 @@ import { Component } from "react"; -import styles from "../../styles/scoreStats.module.css"; +import styles from "../styles/scoreStats.module.css"; import Utils from "../utils/utils"; export default class ScoreStats extends Component { diff --git a/src/components/SongInfo.js b/src/components/SongInfo.js index 55d407d..f63a87e 100644 --- a/src/components/SongInfo.js +++ b/src/components/SongInfo.js @@ -1,7 +1,7 @@ import { Image } from "@nextui-org/react"; import { Component } from "react"; -import styles from "../../styles/songInfo.module.css"; +import styles from "../styles/songInfo.module.css"; export default class SongInfo extends Component { constructor(params) { diff --git a/pages/404.js b/src/pages/404.js similarity index 100% rename from pages/404.js rename to src/pages/404.js diff --git a/pages/_app.js b/src/pages/_app.js similarity index 100% rename from pages/_app.js rename to src/pages/_app.js diff --git a/pages/_document.js b/src/pages/_document.js similarity index 100% rename from pages/_document.js rename to src/pages/_document.js diff --git a/pages/api/beatleader/stars.js b/src/pages/api/beatleader/stars.js similarity index 91% rename from pages/api/beatleader/stars.js rename to src/pages/api/beatleader/stars.js index 5f5a74e..cc2d9de 100644 --- a/pages/api/beatleader/stars.js +++ b/src/pages/api/beatleader/stars.js @@ -1,6 +1,10 @@ import fetch from "node-fetch"; -import WebsiteTypes from "../../../src/consts/LeaderboardType"; -import { getValue, setValue, valueExists } from "../../../src/utils/redisUtils"; +import WebsiteTypes from "../../../../src/consts/LeaderboardType"; +import { + getValue, + setValue, + valueExists, +} from "../../../../src/utils/redisUtils"; const KEY = "BL_MAP_STAR_"; diff --git a/pages/api/beatsaver/map.js b/src/pages/api/beatsaver/map.js similarity index 82% rename from pages/api/beatsaver/map.js rename to src/pages/api/beatsaver/map.js index e8813ac..b11701f 100644 --- a/pages/api/beatsaver/map.js +++ b/src/pages/api/beatsaver/map.js @@ -1,4 +1,4 @@ -import { getMapData } from "../../../src/helpers/beatSaverHelpers"; +import { getMapData } from "../../../../src/helpers/beatSaverHelpers"; export default async function handler(req, res) { const mapHash = req.query.hash; diff --git a/pages/api/scoresaber/stars.js b/src/pages/api/scoresaber/stars.js similarity index 86% rename from pages/api/scoresaber/stars.js rename to src/pages/api/scoresaber/stars.js index 884a21f..cad143e 100644 --- a/pages/api/scoresaber/stars.js +++ b/src/pages/api/scoresaber/stars.js @@ -1,7 +1,11 @@ import fetch from "node-fetch"; -import WebsiteTypes from "../../../src/consts/LeaderboardType"; -import { getValue, setValue, valueExists } from "../../../src/utils/redisUtils"; -import { diffToScoreSaberDiff } from "../../../src/utils/scoreSaberUtils"; +import WebsiteTypes from "../../../../src/consts/LeaderboardType"; +import { + getValue, + setValue, + valueExists, +} from "../../../../src/utils/redisUtils"; +import { diffToScoreSaberDiff } from "../../../../src/utils/scoreSaberUtils"; const KEY = "SS_MAP_STAR_"; diff --git a/pages/api/validateid.js b/src/pages/api/validateid.js similarity index 82% rename from pages/api/validateid.js rename to src/pages/api/validateid.js index a92ce5e..47e9aca 100644 --- a/pages/api/validateid.js +++ b/src/pages/api/validateid.js @@ -1,4 +1,4 @@ -import { isValidSteamId } from "../../src/helpers/validateSteamId"; +import { isValidSteamId } from "../../../src/helpers/validateSteamId"; export default async function handler(req, res) { const steamId = req.query.steamid; diff --git a/pages/index.js b/src/pages/index.js similarity index 98% rename from pages/index.js rename to src/pages/index.js index c464383..4752bd0 100644 --- a/pages/index.js +++ b/src/pages/index.js @@ -13,14 +13,14 @@ import { Text, } from "@nextui-org/react"; import { Component } from "react"; -import NavBar from "../src/components/Navbar"; import { toast, ToastContainer } from "react-toastify"; import "react-toastify/dist/ReactToastify.css"; import { NextSeo } from "next-seo"; -import Utils from "../src/utils/utils"; +import NavBar from "../components/Navbar"; import styles from "../styles/main.module.css"; +import Utils from "../utils/utils"; export default class Home extends Component { constructor(props) { diff --git a/pages/overlay.js b/src/pages/overlay.js similarity index 97% rename from pages/overlay.js rename to src/pages/overlay.js index 8753522..d92d853 100644 --- a/pages/overlay.js +++ b/src/pages/overlay.js @@ -1,11 +1,11 @@ import { Link, Spinner } from "@nextui-org/react"; import { NextSeo } from "next-seo"; import { Component } from "react"; -import PlayerStats from "../src/components/PlayerStats"; -import ScoreStats from "../src/components/ScoreStats"; -import SongInfo from "../src/components/SongInfo"; -import LeaderboardType from "../src/consts/LeaderboardType"; -import Utils from "../src/utils/utils"; +import PlayerStats from "../../src/components/PlayerStats"; +import ScoreStats from "../../src/components/ScoreStats"; +import SongInfo from "../../src/components/SongInfo"; +import LeaderboardType from "../../src/consts/LeaderboardType"; +import Utils from "../../src/utils/utils"; import styles from "../styles/overlay.module.css"; diff --git a/styles/avatar.module.css b/src/styles/avatar.module.css similarity index 100% rename from styles/avatar.module.css rename to src/styles/avatar.module.css diff --git a/styles/globals.css b/src/styles/globals.css similarity index 100% rename from styles/globals.css rename to src/styles/globals.css diff --git a/styles/main.module.css b/src/styles/main.module.css similarity index 100% rename from styles/main.module.css rename to src/styles/main.module.css diff --git a/styles/overlay.module.css b/src/styles/overlay.module.css similarity index 100% rename from styles/overlay.module.css rename to src/styles/overlay.module.css diff --git a/styles/playerStats.module.css b/src/styles/playerStats.module.css similarity index 100% rename from styles/playerStats.module.css rename to src/styles/playerStats.module.css diff --git a/styles/scoreStats.module.css b/src/styles/scoreStats.module.css similarity index 100% rename from styles/scoreStats.module.css rename to src/styles/scoreStats.module.css diff --git a/styles/songInfo.module.css b/src/styles/songInfo.module.css similarity index 100% rename from styles/songInfo.module.css rename to src/styles/songInfo.module.css