Skip to content
This repository has been archived by the owner on Oct 15, 2023. It is now read-only.

Commit

Permalink
chore: organise files (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
ijsKoud authored Jun 9, 2022
2 parents 42fbb51 + 547d0ab commit d4570f3
Show file tree
Hide file tree
Showing 56 changed files with 98 additions and 92 deletions.
14 changes: 0 additions & 14 deletions components/Navbar/index.tsx

This file was deleted.

5 changes: 0 additions & 5 deletions components/index.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Link from "next/link";
import type { FC } from "../../lib/types";
import type { FC } from "../../../lib/types";

interface PropsButton {
className?: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Link from "next/link";
import type { FC } from "../../lib/types";
import type { FC } from "../../../lib/types";

interface PropsButton {
className?: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { motion, Variants } from "framer-motion";
import React from "react";
import type { FC } from "../../lib/types";
import type { FC } from "../../../lib/types";

const variants: Variants = {
hidden: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { motion, Variants } from "framer-motion";
import React from "react";
import type { FC } from "../../lib/types";
import type { FC } from "../../../lib/types";
import BackDrop from "./BackDrop";

const variants: Variants = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { AnimatePresence } from "framer-motion";
import React from "react";
import type { FC } from "../../lib/types";
import type { FC } from "../../../lib/types";
import ModalItem from "./ModalItem";

interface Props {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { FC } from "../../lib/types";
import type { FC } from "../../../lib/types";

interface Props {
className?: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { AnimatePresence, motion, Variants } from "framer-motion";
import { useRouter } from "next/router";
import React from "react";
import type { FC } from "../../lib/types";
import type { FC } from "../../../lib/types";

const variants: Variants = {
initial: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Head from "next/head";
import React from "react";
import type { FC } from "../../lib/types";
import config from "../../config.json";
import type { FC } from "../../../lib/types";
import config from "../../../../config.json";

const Title: FC<{ title: string }> = ({ title }) => {
return (
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import type { Data } from "../../lib/hooks/Lanyard/types";
import type { FC, FCWithLanyard } from "../../lib/types";
import { getAvatar, getEmojiString, getStatusColor } from "../../lib/utils";
import Button from "../Button";
import ToolTip from "../Tooltip";
import type { Data } from "../../../lib/hooks/Lanyard/types";
import type { FC, FCWithLanyard } from "../../../lib/types";
import { getAvatar, getEmojiString, getStatusColor } from "../../../lib/utils";
import Button from "../../general/Button";
import ToolTip from "../../general/Tooltip";

export const Discord: FCWithLanyard = ({ lanyard: { status } }) => {
const Discord: FCWithLanyard = ({ lanyard: { status } }) => {
return status ? (
<div className="discord-container">
<div className="discord-user">
Expand Down Expand Up @@ -66,3 +66,5 @@ const Spotify: FC<{ status: Data }> = ({ status }) => {
</div>
) : null;
};

export default Discord;
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { FCWithLanyard } from "../../lib/types";
import Button from "../Button";
import IconButton from "../IconButton";
import Page from "../Page";
import type { FCWithLanyard } from "../../../lib/types";
import Button from "../../general/Button";
import IconButton from "../../general/IconButton";
import Page from "../../general/Page";

export const Footer: FCWithLanyard = ({ lanyard }) => {
const Footer: FCWithLanyard = ({ lanyard }) => {
return (
<Page className="footer-container-wrapper">
<div className="footer-container">
Expand Down Expand Up @@ -63,3 +63,5 @@ export const Footer: FCWithLanyard = ({ lanyard }) => {
</Page>
);
};

export default Footer;
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { useEffect, useState } from "react";
import type { FCWithLanyard } from "../../lib/types";
import Button from "../Button";
import { Discord } from "../Discord";
import type { FCWithLanyard } from "../../../lib/types";
import Button from "../../general/Button";
import Discord from "../Discord";
import { motion, useAnimation, Variants } from "framer-motion";
import Link from "next/link";

export const DesktopNavbar: FCWithLanyard = ({ lanyard }) => {
const DesktopNavbar: FCWithLanyard = ({ lanyard }) => {
const controller = useAnimation();
const [discordVisible, setDiscordVisible] = useState(false);
const [discordVisibleOverride, setDiscordVisibleOverride] = useState(false);
Expand Down Expand Up @@ -84,3 +84,5 @@ export const DesktopNavbar: FCWithLanyard = ({ lanyard }) => {
</div>
);
};

export default DesktopNavbar;
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { FC } from "../../lib/types";
import type { FC } from "../../../lib/types";

interface Props {
onClick: () => void;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { motion, useAnimation } from "framer-motion";
import Link from "next/link";
import React, { useEffect, useState } from "react";
import type { FCWithLanyard } from "../../lib/types";
import Button from "../Button";
import { Discord } from "../Discord";
import type { FCWithLanyard } from "../../../lib/types";
import Button from "../../general/Button";
import Discord from "../Discord";
import MenuButton from "./MenuButton";

export const MobileNavbar: FCWithLanyard = ({ lanyard }) => {
const MobileNavbar: FCWithLanyard = ({ lanyard }) => {
const [enabled, setEnabled] = useState(false);
const mobileNavbarController = useAnimation();

Expand Down Expand Up @@ -58,3 +58,5 @@ export const MobileNavbar: FCWithLanyard = ({ lanyard }) => {
</>
);
};

export default MobileNavbar;
16 changes: 16 additions & 0 deletions src/components/other/Navbar/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import type { FCWithLanyard } from "../../../lib/types";
import DesktopNavbar from "./DesktopNavbar";
import MobileNavbar from "./MobileNavbar";

const Navbar: FCWithLanyard = ({ lanyard }) => {
return (
<>
{/* Created to block items from moving under navbar */}
<div className="fake-navbar" />
<MobileNavbar lanyard={lanyard} />
<DesktopNavbar lanyard={lanyard} />
</>
);
};

export default Navbar;
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type React from "react";
import type { FC } from "../../lib/types";
import type { FC } from "../../../lib/types";

interface Props {
title: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { FC } from "../../lib/types";
import type { FC } from "../../../lib/types";
import AboutListItem from "./AboutListItem";
import config from "../../config.json";
import config from "../../../../config.json";

const AboutList: FC = () => {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useState } from "react";
import type { FC } from "../../lib/types";
import IconButton from "../IconButton";
import Modal from "../Modal";
import type { FC } from "../../../lib/types";
import IconButton from "../../general/IconButton";
import Modal from "../../general/Modal";
import AboutCard from "./AboutCard";

interface Props {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Image from "next/image";
import type { FC } from "../../lib/types";
import type { FC } from "../../../lib/types";

interface Props {
image: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import axios from "axios";
import { useEffect, useState } from "react";
import Skeleton from "react-loading-skeleton";
import type { AnimeList, FC } from "../../lib/types";
import type { AnimeList, FC } from "../../../lib/types";
import AnimeListItem from "./AnimeListItem";

const AnimeListComp: FC = () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { useEffect, useState } from "react";
import { AnimeList, AnimeStatus, FC } from "../../lib/types";
import { getKitsuCoverImage } from "../../lib/utils";
import Button from "../Button";
import IconButton from "../IconButton";
import Modal from "../Modal";
import { AnimeList, AnimeStatus, FC } from "../../../lib/types";
import { getKitsuCoverImage } from "../../../lib/utils";
import Button from "../../general/Button";
import IconButton from "../../general/IconButton";
import Modal from "../../general/Modal";
import AnimeCard from "./AnimeCard";
import Skeleton from "react-loading-skeleton";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { FC, PinnedRepoItem as iPinnedRepoItem } from "../../lib/types";
import type { FC, PinnedRepoItem as iPinnedRepoItem } from "../../../lib/types";
import Link from "next/link";

interface Props {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Skeleton from "react-loading-skeleton";
import type { FC } from "../../lib/types";
import type { FC } from "../../../lib/types";

const PinnedRepoCardSkeleton: FC = () => {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import axios from "axios";
import { useEffect, useState } from "react";
import type { FC, PinnedRepoItem as iPinnedRepoItem } from "../../lib/types";
import type { FC, PinnedRepoItem as iPinnedRepoItem } from "../../../lib/types";
import PinnedRepoItem from "./PinnedRepoCard";
import PinnedRepoCardSkeleton from "./PinnedRepoCardSkeleton";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { FC, WakaTimeApiResult } from "../../lib/types";
import type { FC, WakaTimeApiResult } from "../../../lib/types";
import ms from "ms";
import { Cell, Pie, PieChart } from "recharts";
import config from "../../config.json";
import config from "../../../../config.json";

const WakaTimeChart: FC<{ stats: WakaTimeApiResult }> = ({ stats }) => {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Skeleton from "react-loading-skeleton";
import type { FC } from "../../lib/types";
import type { FC } from "../../../lib/types";

const WakaTimeSkeleton: FC = () => {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import axios from "axios";
import React, { useEffect, useState } from "react";
import type { FC, WakaTimeApiResult } from "../../lib/types";
import type { FC, WakaTimeApiResult } from "../../../lib/types";
import WakaTimeChart from "./WakaTimeChart";
import WakaTimeSkeleton from "./WakaTimeSkeleton";

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions pages/404.tsx → src/pages/404.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import Page from "../components/Page";
import Page from "../components/general/Page";
import type { NextPageWithLanyard } from "../lib/types";
import React, { useState } from "react";
import { TicTacToe } from "../lib/games/tictactoe";
import Modal from "../components/Modal";
import Modal from "../components/general/Modal";
import { AI_ICON, USER_ICON } from "../lib/constants";
import IconButton from "../components/IconButton";
import Button from "../components/Button";
import Title from "../components/Title";
import IconButton from "../components/general/IconButton";
import Button from "../components/general/Button";
import Title from "../components/general/Title";

const NotFound: NextPageWithLanyard = () => {
const [game, setGame] = useState(new TicTacToe());
Expand Down
7 changes: 4 additions & 3 deletions pages/_app.tsx → src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ import "react-loading-skeleton/dist/skeleton.css";
import type { AppProps } from "next/app";
import { useLanyard } from "../lib/hooks/Lanyard/UseLanyard";
import type { UseLanyardResults } from "../lib/hooks/Lanyard/types";
import { Navbar, Footer } from "../components";
import Head from "next/head";
import PageTransition from "../components/PageTransition";
import config from "../config.json";
import config from "../../config.json";
import Navbar from "../components/other/Navbar";
import PageTransition from "../components/general/PageTransition";
import Footer from "../components/other/Footer";

const App = ({ Component, pageProps }: AppProps<{ lanyard: UseLanyardResults }>) => {
const lanyard = useLanyard({ userId: config.discord });
Expand Down
10 changes: 5 additions & 5 deletions pages/about.tsx → src/pages/about.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import AboutList from "../components/About/AboutList";
import AnimeList from "../components/Anime/AnimeList";
import Page from "../components/Page";
import Title from "../components/Title";
import AboutList from "../components/page-related/About/AboutList";
import AnimeList from "../components/page-related/Anime/AnimeList";
import Page from "../components/general/Page";
import Title from "../components/general/Title";
import type { NextPageWithLanyard } from "../lib/types";
import config from "../config.json";
import config from "../../config.json";

const About: NextPageWithLanyard = () => {
return (
Expand Down
2 changes: 1 addition & 1 deletion pages/api/anime.ts → src/pages/api/anime.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { NextApiRequest, NextApiResponse } from "next";
import type { AnimeList, AnimeListRaw, AnimeApiResponse } from "../../lib/types";
import axios from "axios";
import config from "../../config.json";
import config from "../../../config.json";

const Anime = async (req: NextApiRequest, res: NextApiResponse<AnimeApiResponse>) => {
const response = await axios
Expand Down
2 changes: 1 addition & 1 deletion pages/api/fact.ts → src/pages/api/fact.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { NextApiRequest, NextApiResponse } from "next";
import facts from "../../assets/facts.json";
import facts from "../../../assets/facts.json";

const sources = [
"http://www.djtech.net/humor/useless_facts.htm",
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions pages/index.tsx → src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import TypewriterComponent from "typewriter-effect";
import IconButton from "../components/IconButton";
import Page from "../components/Page";
import IconButton from "../components/general/IconButton";
import Page from "../components/general/Page";
import type { NextPageWithLanyard } from "../lib/types";
import { motion, Variants } from "framer-motion";
import Title from "../components/Title";
import config from "../config.json";
import Title from "../components/general/Title";
import config from "../../config.json";

const getVariants = (key: number) => {
const variants: Variants = {
Expand Down
10 changes: 5 additions & 5 deletions pages/stats.tsx → src/pages/stats.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import Page from "../components/Page";
import Page from "../components/general/Page";
import type { NextPageWithLanyard } from "../lib/types";
import GitHubCalendar from "react-github-calendar";
import PinnedRepos from "../components/PinnedRepos";
import WakaTimeStats from "../components/WakaTimeStats";
import Title from "../components/Title";
import config from "../config.json";
import PinnedRepos from "../components/page-related/PinnedRepos";
import WakaTimeStats from "../components/page-related/WakaTimeStats";
import Title from "../components/general/Title";
import config from "../../config.json";

const Stats: NextPageWithLanyard = () => {
return (
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

1 comment on commit d4570f3

@vercel
Copy link

@vercel vercel bot commented on d4570f3 Jun 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.