Skip to content

Commit

Permalink
Bit of Restructure
Browse files Browse the repository at this point in the history
  • Loading branch information
matherg committed Nov 28, 2023
1 parent 96971ad commit bd94c4e
Show file tree
Hide file tree
Showing 25 changed files with 32 additions and 32 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useState, ChangeEvent, FormEvent } from 'react';
import {Gift, GiftCollection} from "../types.tsx";
import {Gift, GiftCollection} from "../../types.tsx";



Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//import Gift from "./Gift.tsx";
import {Gift} from "../types.tsx";
import {Gift} from "../../types.tsx";

type CollectionItemProps = {
name: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {useEffect} from "react";
import Select from "react-select";
import { useAdmin } from '../Context/AdminContext';
import { useAdmin } from '../../Context/AdminContext.tsx';

interface CollectionSelectorProps {
selectedOption: Number | null;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useState } from 'react';
import axios from 'axios';
import {Gift} from "../types.tsx";
import {Gift} from "../../types.tsx";


const defaultGift: Gift = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Gift} from "../types.tsx";
import {Gift} from "../../types.tsx";



Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState } from "react";
import ResponseCard from "./ResponseCard";
import ResponseForm from "./ResponseForm";
import { GiftRequest } from "../types";
import ResponseCard from "./ResponseCard.tsx";
import ResponseForm from "./ResponseForm.tsx";
import { GiftRequest } from "../../types.tsx";

const RequestCard: React.FC<GiftRequest> = ({
ID,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import { GiftResponse } from "../types";
import { GiftResponse } from "../../types.tsx";

const ResponseCard: React.FC<GiftResponse> = ({
GiftCollection,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import CollectionSelector from "./CollectionSelector";
import CollectionSelector from "./CollectionSelector.tsx";
import axios from "axios";
import React, {useState} from "react";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Gift } from "../types.tsx";
import { Gift } from "../../types.tsx";

type CollectionItemProps = {
name: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import FilterSection from "./FilterSection";
import FilterSection from "./FilterSection.tsx";

const recipients = ["For Her", "For Him", "For Mom", "For Dad"];
const interests = ["Sports", "Cooking", "Games"];
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Gift } from "../types";
import { Gift } from "../../types.tsx";

type GiftItemProps = {
gift: Gift;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState } from "react";
import { Link } from "react-router-dom";
import FormInput, { FormInputProps } from "./FormInput";
import { LoginInputs } from "../pages/LoginPage";
import FormInput, { FormInputProps } from "./FormInput.tsx";
import { LoginInputs } from "../../pages/LoginPage.tsx";

export type FormData = {
title: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useState } from "react";
import Filter from "./Filter";
import Filter from "../Home/Filter.tsx";

const GiftSortNavbar = () => {
const [activeButton, setActiveButton] = useState("");
Expand Down
2 changes: 1 addition & 1 deletion client/src/data/formData.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FormData } from "../components/LoginForm";
import { FormData } from "../components/Login/LoginForm.tsx";

export const loginFormData: FormData = {
title: "Log In",
Expand Down
6 changes: 3 additions & 3 deletions client/src/pages/CollectionsPage.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {useEffect, useState} from "react";
import CollectionItem from "../components/CollectionItem";
import EditForm from "../components/CollectionForm";
import Navbar from "../components/Navbar";
import CollectionItem from "../components/Admin/CollectionItem.tsx";
import EditForm from "../components/Admin/CollectionForm.tsx";
import Navbar from "../components/Admin/Navbar.tsx";
import {GiftCollection} from "../types.tsx";
import {useAdmin} from "../Context/AdminContext.tsx";
import axios from "axios";
Expand Down
6 changes: 3 additions & 3 deletions client/src/pages/GiftManagementPage.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import GiftItem from '../components/GiftItem'
import Navbar from "../components/Navbar";
import GiftItem from '../components/Admin/GiftItem.tsx'
import Navbar from "../components/Admin/Navbar.tsx";
import {useAdmin} from "../Context/AdminContext.tsx";
import {useEffect, useState} from "react";
import GiftForm from "../components/GiftForm.tsx";
import GiftForm from "../components/Admin/GiftForm.tsx";
import {Gift} from "../types.tsx";
import axios from "axios";

Expand Down
10 changes: 5 additions & 5 deletions client/src/pages/HomePage.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import NavBar from "../components/NavBarUpdated";
import CollectionItem from "../components/CollectionItemUpdated";
import SearchBar from "../components/SearchBar";
import GiftSortNavBar from "../components/GiftSortNavBar";
import UpdatedGiftItem from "../components/UpdatedGiftItem";
import NavBar from "../components/Home/NavBarUpdated.tsx";
import CollectionItem from "../components/Home/CollectionItemUpdated.tsx";
import SearchBar from "../components/Home/SearchBar.tsx";
import GiftSortNavBar from "../components/Nav/GiftSortNavBar.tsx";
import UpdatedGiftItem from "../components/Home/UpdatedGiftItem.tsx";
import axios from "axios";
import {useEffect, useState} from "react";
import {Gift, GiftCollection} from "../types.tsx";
Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/LoginPage.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import LoginForm from "../components/LoginForm";
import LoginForm from "../components/Login/LoginForm.tsx";
import { loginFormData } from "../data/formData";

export type LoginInputs = {
Expand Down
4 changes: 2 additions & 2 deletions client/src/pages/RequestsPage.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Navbar from "../components/Navbar";
import RequestCard from "../components/RequestCard";
import Navbar from "../components/Admin/Navbar.tsx";
import RequestCard from "../components/Admin/RequestCard.tsx";
import {useEffect, useState} from "react";
import Select, {ActionMeta} from "react-select";
import {GiftRequest} from "../types.tsx";
Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/SignUpPage.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import LoginForm from "../components/LoginForm";
import LoginForm from "../components/Login/LoginForm.tsx";
import { LoginInputs } from "./LoginPage";
import { signUpFormData } from "../data/formData";

Expand Down

0 comments on commit bd94c4e

Please sign in to comment.