Skip to content

Commit

Permalink
file reorg and klang demo button rearrange (#384)
Browse files Browse the repository at this point in the history
  • Loading branch information
Winston-Hsiao authored Sep 12, 2024
1 parent 76a249c commit 9ff4350
Show file tree
Hide file tree
Showing 32 changed files with 25 additions and 93 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/auth/LoginForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Input } from "@/components/ui/Input/Input";
import PasswordInput from "@/components/ui/Input/PasswordInput";
import { useAlertQueue } from "@/hooks/useAlertQueue";
import { useAuthentication } from "@/hooks/useAuth";
import { LoginSchema, LoginType } from "@/types";
import { LoginSchema, LoginType } from "@/lib/types";
import { zodResolver } from "@hookform/resolvers/zod";

const LoginForm = () => {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/auth/SignupForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Input } from "@/components/ui/Input/Input";
import PasswordInput from "@/components/ui/Input/PasswordInput";
import { useAlertQueue } from "@/hooks/useAlertQueue";
import { useAuthentication } from "@/hooks/useAuth";
import { SignUpSchema, SignupType } from "@/types";
import { SignUpSchema, SignupType } from "@/lib/types";
import { zodResolver } from "@hookform/resolvers/zod";
import zxcvbn from "zxcvbn";

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/auth/SignupWithEmail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import ErrorMessage from "@/components/ui/ErrorMessage";
import { Input } from "@/components/ui/Input/Input";
import { useAlertQueue } from "@/hooks/useAlertQueue";
import { useAuthentication } from "@/hooks/useAuth";
import { EmailSignupSchema, EmailSignupType } from "@/types";
import { EmailSignupSchema, EmailSignupType } from "@/lib/types";
import { zodResolver } from "@hookform/resolvers/zod";

interface EmailSignUpResponse {
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/footer/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { FaDiscord, FaGithub, FaLinkedinIn } from "react-icons/fa";
import { Link, useLocation, useNavigate } from "react-router-dom";

import smallLogo from "@/assets/small-logo.png";
import SocialLink from "@/components/footer/SocialLink";
import smallLogo from "@/images/small-logo.png";
import {
DiscordPrimaryColor,
GithubPrimaryColor,
LinkedinPrimaryColor,
} from "@/types/colors";
} from "@/lib/types/colors";

const Footer = () => {
const navigate = useNavigate();
Expand Down
File renamed without changes.
68 changes: 0 additions & 68 deletions frontend/src/components/home/Features.tsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ speakPhrase("Hello, I am a robot.");`,
Watch K-Lang in action
</p>
</div>
<div className="grid gap-6">
<div className="flex flex-row space-x-4">
<div className="grid gap-6 md:grid-cols-3">
<div className="flex flex-row gap-4 col-span-2 md:col-span-1 md:flex-col">
<Button
variant={activeAction === "manipulate" ? "default" : "outline"}
onClick={() => setActiveAction("manipulate")}
Expand All @@ -88,10 +88,10 @@ speakPhrase("Hello, I am a robot.");`,
</Button>
</div>
<div
className="rounded-lg border bg-card text-card-foreground shadow-sm"
className="rounded-lg border bg-card text-card-foreground shadow-sm col-span-2 md:col-span-2"
data-v0-t="card"
>
<pre className="text-sm text-gray-800 dark:text-gray-200 bg-gray-100 dark:bg-gray-900 p-4 rounded-md overflow-x-auto">
<pre className="text-sm text-gray-800 dark:text-gray-200 bg-gray-100 dark:bg-[#222222] p-4 rounded-md overflow-x-auto">
<code>{codeSnippets[activeAction]}</code>
</pre>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default function NavSection() {
].map((item, index) => (
<Card
key={index}
className="cursor-pointer flex flex-col h-full transition-all duration-300 ease-in-out hover:scale-105 hover:shadow-lg bg-gradient-to-br from-white to-gray-100 dark:from-[#222222] dark:to-[#111111]"
className="cursor-pointer flex flex-col h-full transition-all duration-300 ease-in-out hover:scale-105 hover:shadow-lg bg-gradient-to-br from-white to-gray-100 dark:from-[#111111] dark:to-black"
onClick={() => navigate(item.path)}
>
<CardHeader>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/listing/FileUpload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
import { buttonVariants } from "@/components/ui/Buttons/Button";
import { Input } from "@/components/ui/Input/Input";
import { useAlertQueue } from "@/hooks/useAlertQueue";
import { cn } from "@/utils";
import { cn } from "@/lib/utils";
import { Trash2 as RemoveIcon } from "lucide-react";

type DirectionOptions = "rtl" | "ltr" | undefined;
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/listing/ListingHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import Spinner from "@/components/ui/Spinner";
import { paths } from "@/gen/api";
import { useAlertQueue } from "@/hooks/useAlertQueue";
import { useAuthentication } from "@/hooks/useAuth";
import { formatNumber } from "@/utils/formatNumber";
import { formatTimeSince } from "@/utils/formatTimeSince";
import { formatNumber } from "@/lib/utils/formatNumber";
import { formatTimeSince } from "@/lib/utils/formatTimeSince";

import ListingDeleteButton from "./ListingDeleteButton";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { useEffect, useRef, useState } from "react";
import { FaTimes } from "react-icons/fa";

import { Button } from "@/components/ui/Buttons/Button";
import { BACKEND_URL } from "@/constants/env";
import { humanReadableError } from "@/hooks/useAlertQueue";
import { useAuthentication } from "@/hooks/useAuth";
import { BACKEND_URL } from "@/lib/constants/env";
import { cx } from "class-variance-authority";

type Level = "success" | "info" | "error";
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/pages/Create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Header from "@/components/ui/Header";
import { Input, TextArea } from "@/components/ui/Input/Input";
import { useAlertQueue } from "@/hooks/useAlertQueue";
import { useAuthentication } from "@/hooks/useAuth";
import { NewListingSchema, NewListingType } from "@/types";
import { NewListingSchema, NewListingType } from "@/lib/types";
import { zodResolver } from "@hookform/resolvers/zod";

const Create = () => {
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/components/pages/Home.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import BuySection from "@/components/landing/BuySection";
import HeroASCIIArt from "@/components/landing/HeroASCIIArt";
import KLangDemo from "@/components/landing/KLangDemo";
import NavSection from "@/components/landing/NavSection";
import BuySection from "@/components/home/BuySection";
import HeroASCIIArt from "@/components/home/HeroASCIIArt";
import KLangDemo from "@/components/home/KLangDemo";
import NavSection from "@/components/home/NavSection";

const Home = () => {
return (
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/ui/Meteors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { useEffect, useState } from "react";

import { cn } from "@/utils";
import { cn } from "@/lib/utils";

interface MeteorsProps {
number?: number;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/ui/Skeleton.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { cn } from "@/utils";
import { cn } from "@/lib/utils";

function Skeleton({
className,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/ui/ToolTip.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from "react";

import { cn } from "@/utils";
import { cn } from "@/lib/utils";

interface TooltipProps {
content: string;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/ui/TypingAnimation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { useEffect, useState } from "react";

import { cn } from "@/utils";
import { cn } from "@/lib/utils";

interface TypingAnimationProps {
text: string;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/ui/dialog.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from "react";

import { cn } from "@/utils";
import { cn } from "@/lib/utils";
import * as DialogPrimitive from "@radix-ui/react-dialog";
import { X } from "lucide-react";

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/hooks/useAuth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import {
} from "react";
import { useNavigate } from "react-router-dom";

import { BACKEND_URL } from "@/constants/env";
import type { paths } from "@/gen/api";
import api from "@/hooks/api";
import { BACKEND_URL } from "@/lib/constants/env";
import createClient, { Client } from "openapi-fetch";

const AUTH_KEY_ID = "AUTH";
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.

0 comments on commit 9ff4350

Please sign in to comment.