Skip to content

Commit

Permalink
Merge pull request #40 from chingu-x/enhancement/misc_maintenance
Browse files Browse the repository at this point in the history
Enhancement/misc maintenance
  • Loading branch information
Dan-Y-Ko authored Oct 9, 2023
2 parents c2d8e94 + 26c1ad1 commit c716323
Show file tree
Hide file tree
Showing 43 changed files with 468 additions and 250 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
"dependencies": {
"@heroicons/react": "^2.0.18",
"@reduxjs/toolkit": "^1.9.5",
"next": "13.4.12",
"next": "^13.5.4",
"next-themes": "^0.2.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-redux": "^8.1.2",
"zod": "^3.21.4"
},
Expand All @@ -35,7 +35,7 @@
"cypress": "^12.17.3",
"daisyui": "^3.5.0",
"eslint": "8.46.0",
"eslint-config-next": "13.4.12",
"eslint-config-next": "^13.5.4",
"eslint-config-prettier": "^8.10.0",
"eslint-import-resolver-typescript": "^3.5.5",
"eslint-plugin-import": "^2.28.0",
Expand Down
4 changes: 2 additions & 2 deletions src/app/directory/components/EditCell.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { PencilSquareIcon } from "@heroicons/react/24/solid";
import { TeamMember } from ".";
import { Button } from "@/components";
import type { TeamMember } from "./fixtures/MyTeam";
import Button from "@/components/Button";

interface EditCellProps {
teamMember: TeamMember;
Expand Down
3 changes: 2 additions & 1 deletion src/app/directory/components/TeamCard.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { EditCell, TeamMember } from ".";
import EditCell from "./EditCell";
import type { TeamMember } from "./fixtures/MyTeam";

interface TeamCardProps {
teamMember: TeamMember;
Expand Down
3 changes: 2 additions & 1 deletion src/app/directory/components/TeamCardsContainer.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { TeamCard, teamMembers } from ".";
import TeamCard from "./TeamCard";
import { teamMembers } from "./fixtures/MyTeam";

// Temp:
const currentUserId = "1";
Expand Down
3 changes: 2 additions & 1 deletion src/app/directory/components/TeamDirectory.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { TeamCardsContainer, TeamTable } from ".";
import TeamCardsContainer from "./TeamCardsContainer";
import TeamTable from "./TeamTable";

export default function TeamDirectory() {
return (
Expand Down
3 changes: 2 additions & 1 deletion src/app/directory/components/TeamRow.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { EditCell, TeamMember } from ".";
import EditCell from "./EditCell";
import type { TeamMember } from "./fixtures/MyTeam";

interface TeamRowProps {
teamMember: TeamMember;
Expand Down
3 changes: 2 additions & 1 deletion src/app/directory/components/TeamTable.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import styles from "./TeamRow.module.css";
import { TeamRow, teamMembers } from ".";
import TeamRow from "./TeamRow";
import { teamMembers } from "./fixtures/MyTeam";

// Temp:
const currentUserId = "1";
Expand Down
7 changes: 0 additions & 7 deletions src/app/directory/components/index.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/app/directory/index.ts

This file was deleted.

4 changes: 2 additions & 2 deletions src/app/directory/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { TeamDirectory } from ".";
import { Banner } from "@/components";
import TeamDirectory from "./components/TeamDirectory";
import Banner from "@/components/Banner";

function DirectoryPage() {
return (
Expand Down
3 changes: 2 additions & 1 deletion src/app/ideation/components/ContributionCard.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Avatar, Button } from "@/components";
import Avatar from "@/components/Avatar";
import Button from "@/components/Button";

interface ContributionCardProps {
own_idea: boolean;
Expand Down
4 changes: 2 additions & 2 deletions src/app/ideation/components/CreateIdeationContainer.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { VoteDescriptionCard } from ".";
import { Button } from "@/components";
import VoteDescriptionCard from "./VoteDescriptionCard";
import Button from "@/components/Button";

function CreateIdeationContainer() {
return (
Expand Down
4 changes: 3 additions & 1 deletion src/app/ideation/components/IdeationContainer.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { ContributionCard, VoteCard, type Ideation } from ".";
import ContributionCard from "./ContributionCard";
import VoteCard from "./VoteCard";
import type { Ideation } from "./fixtures/ideation";

function IdeationContainer({
title,
Expand Down
3 changes: 2 additions & 1 deletion src/app/ideation/components/VoteCard.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Avatar, Button } from "@/components";
import Avatar from "@/components/Avatar";
import Button from "@/components/Button";

interface VoteCardProps {
users: string[];
Expand Down
1 change: 0 additions & 1 deletion src/app/ideation/components/fixtures/index.ts

This file was deleted.

6 changes: 0 additions & 6 deletions src/app/ideation/components/index.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/app/ideation/index.ts

This file was deleted.

6 changes: 4 additions & 2 deletions src/app/ideation/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { CreateIdeationContainer, IdeationContainer, ideation } from ".";
import { Banner } from "@/components";
import CreateIdeationContainer from "./components/CreateIdeationContainer";
import IdeationContainer from "./components/IdeationContainer";
import { ideation } from "./components/fixtures/ideation";
import Banner from "@/components/Banner";

function IdeationPage() {
return (
Expand Down
3 changes: 0 additions & 3 deletions src/app/index.ts

This file was deleted.

5 changes: 4 additions & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import "./globals.css";
import type { Metadata } from "next";
import { Inter } from "next/font/google";
import { StoreProvider, Navbar, Sidebar, ThemeProvider } from "@/components";
import StoreProvider from "@/components/StoreProvider";
import ThemeProvider from "@/components/ThemeProvider";
import Sidebar from "@/components/sidebar/Sidebar";
import Navbar from "@/components/navbar/Navbar";

export const metadata: Metadata = {
title: "Create Next App",
Expand Down
5 changes: 3 additions & 2 deletions src/app/tech-stack/components/TechStackCard.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { PlusCircleIcon } from "@heroicons/react/24/outline";
import { TechItem } from ".";
import { Avatar, Button } from "@/components";
import type { TechItem } from "./fixtures/TechStack";
import Avatar from "@/components/Avatar";
import Button from "@/components/Button";

interface TechStackCardProps {
title: string;
Expand Down
3 changes: 2 additions & 1 deletion src/app/tech-stack/components/TechStackContainer.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { TechStackCard, techStack } from ".";
import TechStackCard from "./TechStackCard";
import { techStack } from "./fixtures/TechStack";

export default function TechStackContainer() {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/app/tech-stack/components/fixtures/TechStack.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CardType } from "@/app/tech-stack/components/types/types";
import type { CardType } from "@/app/tech-stack/components/types/types";

export interface TechItem {
id: number;
Expand Down
4 changes: 0 additions & 4 deletions src/app/tech-stack/components/index.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/app/tech-stack/index.ts

This file was deleted.

4 changes: 2 additions & 2 deletions src/app/tech-stack/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { TechStackContainer } from ".";
import { Banner } from "@/components";
import TechStackContainer from "./components/TechStackContainer";
import Banner from "@/components/Banner";

export default function TeckStackPage() {
return (
Expand Down
4 changes: 2 additions & 2 deletions src/components/Banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ function Banner({ image, alt, title, description }: BannerProps) {
src={image}
alt={alt}
fill={true}
objectFit="contain"
priority={false}
style={{ objectFit: "contain" }}
priority={true}
/>
</div>
<div className="flex flex-col max-w-[700px] 2xl:max-w-none justify-center gap-y-3.5">
Expand Down
2 changes: 1 addition & 1 deletion src/components/StoreProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { Provider } from "react-redux";
import { ReactNode } from "react";
import { store } from "@/store";
import { store } from "@/store/store";

function StoreProvider({ children }: { children: ReactNode }) {
return <Provider store={store}>{children}</Provider>;
Expand Down
8 changes: 0 additions & 8 deletions src/components/index.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/components/navbar/DropDown.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ChevronDownIcon } from "@heroicons/react/24/outline";
import { DropDownLink } from ".";
import DropDownLink from "./DropDownLink";

export default function DropDown({ name }: { name: string }) {
return (
Expand Down
6 changes: 5 additions & 1 deletion src/components/navbar/Navbar.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { Avatar, Bell, ChinguMenu, DropDown, ModeToggle } from "@/components";
import DropDown from "./DropDown";
import ChinguMenu from "./ChinguMenu";
import Bell from "./Bell";
import Avatar from "@/components/Avatar";
import ModeToggle from "@/components/ModeToggle";

const name = "Yorick";
const notificationCount = 4;
Expand Down
5 changes: 0 additions & 5 deletions src/components/navbar/index.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/components/sidebar/ExpandButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
ArrowLeftOnRectangleIcon,
ArrowRightOnRectangleIcon,
} from "@heroicons/react/24/solid";
import { Button } from "@/components";
import Button from "@/components/Button";

interface ExpandButtonProps {
isOpen: boolean;
Expand Down
2 changes: 1 addition & 1 deletion src/components/sidebar/PageButton.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Link from "next/link";
import { usePathname } from "next/navigation";
import { MainPages, PageProperty, voyagePages } from "./Sidebar";
import { Button } from "@/components";
import Button from "@/components/Button";

interface PageButtonProps {
element: PageProperty;
Expand Down
2 changes: 0 additions & 2 deletions src/components/sidebar/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,10 @@ export default function Sidebar() {
const handlePageClick = (element: PageProperty | string) => {
if (typeof element === "string") {
setSelectedButton(element);
setIsOpenSidebar(false);
} else if (element.name === MainPages.myVoyage) {
setIsOpenSidebar(true);
} else {
setSelectedButton(element.link);
setIsOpenSidebar(false);
}
};

Expand Down
2 changes: 1 addition & 1 deletion src/components/sidebar/VoyagePageButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ArrowRightCircleIcon } from "@heroicons/react/20/solid";
import { LockClosedIcon } from "@heroicons/react/24/solid";
import Link from "next/link";
import { VoyagePageProperty } from "./Sidebar";
import { Button } from "@/components";
import Button from "@/components/Button";

interface VoyagePageButtonProps {
element: VoyagePageProperty;
Expand Down
4 changes: 0 additions & 4 deletions src/components/sidebar/index.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/components/test/ModeToggle.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { render, screen, fireEvent } from "@testing-library/react";
import { ThemeProvider, useTheme } from "next-themes";
import { ModeToggle } from "@/components";
import ModeToggle from "@/components/ModeToggle";

function WrapperComponent({
children,
Expand Down
2 changes: 1 addition & 1 deletion src/store/features/counter/counterSlice.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createSlice } from "@reduxjs/toolkit";
import type { RootState } from "@/store";
import type { RootState } from "@/store/store";

interface Counterstate {
value: number;
Expand Down
1 change: 0 additions & 1 deletion src/store/features/counter/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/store/features/index.ts

This file was deleted.

3 changes: 0 additions & 3 deletions src/store/index.ts

This file was deleted.

Loading

0 comments on commit c716323

Please sign in to comment.