Skip to content

Commit

Permalink
Merge branch 'master' into 236-hashed-password
Browse files Browse the repository at this point in the history
  • Loading branch information
Winston-Hsiao committed Aug 5, 2024
2 parents 358e3e5 + 43067bb commit b137f21
Show file tree
Hide file tree
Showing 39 changed files with 348 additions and 327 deletions.
27 changes: 0 additions & 27 deletions .env.example

This file was deleted.

6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ start-docker-dynamodb:
@docker rm store-db || true
@docker run --name store-db -d -p 8000:8000 amazon/dynamodb-local

start-docker-backend:
@docker kill store-backend || true
@docker rm store-backend || true
@docker build -t store-backend .
@docker run --name store-backend -d -p 8080:8080 store-backend

# ------------------------ #
# Code Formatting #
# ------------------------ #
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import Container from "components/Container";
import Footer from "components/footer/Footer";
import Navbar from "components/nav/Navbar";
import NotFoundRedirect from "components/NotFoundRedirect";
import { AlertQueue, AlertQueueProvider } from "hooks/alerts";
import { AuthenticationProvider } from "hooks/auth";
import { AlertQueue, AlertQueueProvider } from "hooks/useAlertQueue";
import { AuthenticationProvider } from "hooks/useAuth";
import { DarkModeProvider } from "hooks/useDarkMode";
import About from "pages/About";
import APIKeys from "pages/APIKeys";
Expand Down
5 changes: 1 addition & 4 deletions frontend/src/components/Image.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
const Image = () => {
return (
<div>
<img
className="w-full rounded-t"
src="data:image/svg+xml,%3Csvg%20width%3D%22344%22%20height%3D%22194%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%3Cdefs%3E%3Cpath%20id%3D%22a%22%20d%3D%22M-1%200h344v194H-1z%22%2F%3E%3C%2Fdefs%3E%3Cg%20transform%3D%22translate(1)%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Cmask%20id%3D%22b%22%20fill%3D%22%23fff%22%3E%3Cuse%20xlink%3Ahref%3D%22%23a%22%2F%3E%3C%2Fmask%3E%3Cuse%20fill%3D%22%23BDBDBD%22%20xlink%3Ahref%3D%22%23a%22%2F%3E%3Cg%20mask%3D%22url(%23b)%22%3E%3Cpath%20d%3D%22M173.65%2069.238L198.138%2027%20248%20112.878h-49.3c.008.348.011.697.011%201.046%200%2028.915-23.44%2052.356-52.355%2052.356C117.44%20166.28%2094%20142.84%2094%20113.924c0-28.915%2023.44-52.355%2052.356-52.355%2010%200%2019.347%202.804%2027.294%207.669zm0%200l-25.3%2043.64h50.35c-.361-18.478-10.296-34.61-25.05-43.64z%22%20fill%3D%22%23757575%22%2F%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E"
/>
<div className="animate-pulse bg-gray-200 w-full aspect-square"></div>
</div>
);
};
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/auth/AuthBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import BackButton from "components/ui/Button/BackButton";
import { Card, CardContent, CardFooter, CardHeader } from "components/ui/Card";
import Header from "components/ui/Header";
import Spinner from "components/ui/Spinner";
import { useAlertQueue } from "hooks/alerts";
import { useAuthentication } from "hooks/auth";
import { useAlertQueue } from "hooks/useAlertQueue";
import { useAuthentication } from "hooks/useAuth";
import { useEffect, useState } from "react";
import AuthProvider from "./AuthProvider";
import LoginForm from "./LoginForm";
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/auth/RequireAuthentication.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import LogInModal from "components/auth/AuthenticationModal";
import { useAuthentication } from "hooks/auth";
import { useAuthentication } from "hooks/useAuth";
import React from "react";

interface Props {
Expand Down
180 changes: 0 additions & 180 deletions frontend/src/components/listing/EditListingModal.tsx

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { buttonVariants } from "components/ui/Button/Button";
import { Input } from "components/ui/Input/Input";
import { Trash2 as RemoveIcon } from "lucide-react";
import {
createContext,
Expand All @@ -17,8 +19,6 @@ import {
useDropzone,
} from "react-dropzone";
import { cn } from "utils";
import { buttonVariants } from "./Button/Button";
import { Input } from "./Input/Input";

type DirectionOptions = "rtl" | "ltr" | undefined;

Expand Down Expand Up @@ -326,7 +326,7 @@ export const FileInput = forwardRef<
>
<div
className={cn(
`w-full rounded-lg duration-300 ease-in-out
`w-full rounded-lg duration-300 ease-in-out border-2 border-dashed
${
dropzoneState.isDragAccept
? "border-green-500"
Expand All @@ -351,3 +351,27 @@ export const FileInput = forwardRef<
});

FileInput.displayName = "FileInput";

export const FileSubmitButton = forwardRef<
HTMLButtonElement,
React.ButtonHTMLAttributes<HTMLButtonElement>
>(({ children, className, ...props }, ref) => {
const { isLOF } = useFileUpload();
return (
<button
ref={ref}
type="button"
disabled={!isLOF}
className={cn(
buttonVariants({ variant: "primary" }),
"w-full",
className,
)}
{...props}
>
{children}
</button>
);
});

FileSubmitButton.displayName = "FileSubmitButton";
Loading

0 comments on commit b137f21

Please sign in to comment.