Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some fixes #721

Merged
merged 5 commits into from
Dec 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion apps/kampus/app/ThemeProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
"use client";

import { type PropsWithChildren } from "react";
import { Theme, ThemePanel } from "@radix-ui/themes";
import {
Theme,
// ThemePanel
} from "@radix-ui/themes";

import "@radix-ui/themes/styles.css";

Expand Down
15 changes: 2 additions & 13 deletions apps/kampus/app/pano/CreatePanoPostForm.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
"use client";

import { Button, Flex, Heading, Separator, Text, TextArea, TextField } from "@radix-ui/themes";
import { Button, Flex, Text, TextArea, TextField } from "@radix-ui/themes";
import { graphql, useMutation } from "react-relay";
import { z } from "zod";

import {
Form,
FormControl,
FormDescription,
FormField,
FormItem,
FormLabel,
FormMessage,
Input,
Textarea,
useForm,
} from "@kampus/ui";
import { Form, FormControl, FormField, FormItem, FormMessage, useForm } from "@kampus/ui";

const mutation = graphql`
mutation CreatePanoPostFormMutation(
Expand Down
13 changes: 2 additions & 11 deletions apps/kampus/app/pano/CreatePostCommentForm.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
"use client";

import { useParams } from "next/navigation";
import { Button, Flex, Text, TextArea } from "@radix-ui/themes";
import { Button, Flex, TextArea } from "@radix-ui/themes";
import { graphql, useFragment, useMutation } from "react-relay";
import { z } from "zod";

import {
Form,
FormControl,
FormField,
FormItem,
FormLabel,
FormMessage,
Textarea,
useForm,
} from "@kampus/ui";
import { Form, FormControl, FormField, FormItem, FormMessage, useForm } from "@kampus/ui";

import { type CreatePostCommentForm_viewer$key } from "./__generated__/CreatePostCommentForm_viewer.graphql";

Expand Down
1 change: 0 additions & 1 deletion apps/kampus/app/pano/PanoFeed.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Suspense } from "react";
import Link from "next/link";
import { Button, Flex } from "@radix-ui/themes";
import { graphql, useFragment, usePaginationFragment } from "react-relay";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import { DotsHorizontalIcon, DotsVerticalIcon } from "@radix-ui/react-icons";
import { DotsVerticalIcon } from "@radix-ui/react-icons";
import { AlertDialog, Button, DropdownMenu, Flex, IconButton } from "@radix-ui/themes";
import { graphql, useFragment, useMutation } from "react-relay";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { Box, Flex, IconButton, Text } from "@radix-ui/themes";
import { Flex, IconButton, Text } from "@radix-ui/themes";
import { ArrowBigUp } from "lucide-react";
import { graphql, useFragment, useMutation } from "react-relay";

import { Button } from "@kampus/ui";

import { type CommentUpvoteButton_comment$key } from "./__generated__/CommentUpvoteButton_comment.graphql";

interface Props {
Expand Down
2 changes: 1 addition & 1 deletion apps/kampus/app/pano/features/post-list/MoreOptions.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";

import Link from "next/link";
import { DotsHorizontalIcon, DotsVerticalIcon } from "@radix-ui/react-icons";
import { DotsVerticalIcon } from "@radix-ui/react-icons";
import { AlertDialog, Button, DropdownMenu, Flex, IconButton } from "@radix-ui/themes";
import { graphql, useFragment, useMutation } from "react-relay";

Expand Down
4 changes: 2 additions & 2 deletions apps/kampus/app/pano/features/post-list/PostItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

import NextLink from "next/link";
import { ChatBubbleIcon, ExternalLinkIcon } from "@radix-ui/react-icons";
import { Button, Card, Flex, Heading, IconButton, Inset, Text, Tooltip } from "@radix-ui/themes";
import { Button, Card, Flex, Heading, Text, Tooltip } from "@radix-ui/themes";
import { graphql, useFragment } from "react-relay";

import { TimeAgo } from "@kampus/ui";
import { cn } from "@kampus/ui/utils";

import { getPostURL, getSitePostsURL } from "~/features/kampus-url/pano";
import { getPostURL } from "~/features/kampus-url/pano";
import { type PostItem_post$key } from "./__generated__/PostItem_post.graphql";
import { type PostItem_viewer$key } from "./__generated__/PostItem_viewer.graphql";
import { MoreOptionsDropdown } from "./MoreOptions";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { ThickArrowUpIcon, TriangleUpIcon } from "@radix-ui/react-icons";
import { Button, Flex, IconButton, Text, Theme } from "@radix-ui/themes";
import { Button, Flex } from "@radix-ui/themes";
import { ArrowBigUp } from "lucide-react";
import { graphql, useFragment, useMutation } from "react-relay";

Expand Down
2 changes: 1 addition & 1 deletion apps/kampus/app/pano/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { PlusIcon } from "@radix-ui/react-icons";
import { Box, Container, Theme } from "@radix-ui/themes";
import { Container, Theme } from "@radix-ui/themes";

import { MainNav, MainNavBrand, MainNavLink } from "~/features/main-nav";

Expand Down
5 changes: 2 additions & 3 deletions apps/kampus/app/sozluk/[term]/SozlukTerm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

import { graphql, usePreloadedQuery } from "react-relay";

import { type SerializablePreloadedQuery } from "features/relayfeatures/relay";
import useSerializablePreloadedQuery from "features/relayfeatures/relayfeatures/relay/use-serializable-preloaded-query";

import { type SerializablePreloadedQuery } from "~/features/relay";
import useSerializablePreloadedQuery from "~/features/relay/use-serializable-preloaded-query";
import { type SozlukTermQuery } from "./__generated__/SozlukTermQuery.graphql";
import { SozlukTermBody } from "./SozlukTermBody";
import { SozlukTermTitle } from "./SozlukTermTitle";
Expand Down
24 changes: 0 additions & 24 deletions apps/kampus/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,30 +21,6 @@ const config = {
source: "/gql",
destination: GQL_URL,
},
// if the host is `pano.*`,
// this rewrite will be applied
{
source: "/:path((?!_next/|_static/|[\\w-]+\\.\\w+).*)",
has: [
{
type: "host",
value: "pano.(.*)",
},
],
destination: "/pano/:path",
},
// if the host is `sozluk.*`,
// this rewrite will be applied
{
source: "/:path((?!_next/|_static/|[\\w-]+\\.\\w+).*)",
has: [
{
type: "host",
value: "sozluk.(.*)",
},
],
destination: "/sozluk/:path",
},
],
afterFiles: [],
fallback: [],
Expand Down
45 changes: 0 additions & 45 deletions apps/studio/stories/AlertDialog.stories.tsx

This file was deleted.

126 changes: 0 additions & 126 deletions packages/ui/components/alert-dialog.tsx

This file was deleted.

Loading