diff --git a/Admin/.gitignore b/Admin/.gitignore new file mode 100644 index 0000000..24cdedf --- /dev/null +++ b/Admin/.gitignore @@ -0,0 +1,23 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# production +/build + +# misc +.DS_Store +.env.local +.env.development.local +.env.test.local +.env.production.local + +npm-debug.log* +yarn-debug.log* +yarn-error.log* \ No newline at end of file diff --git a/Admin/.npmrc b/Admin/.npmrc new file mode 100644 index 0000000..acb88cc --- /dev/null +++ b/Admin/.npmrc @@ -0,0 +1,2 @@ +legacy-peer-deps=true +strict-peer-dependencies=false \ No newline at end of file diff --git a/Admin/README.md b/Admin/README.md new file mode 100644 index 0000000..98ec3f7 --- /dev/null +++ b/Admin/README.md @@ -0,0 +1,42 @@ +
+ +
+ )}
+ Header={() => ~/{data?.name}
+/{data?.name}
+/{data?.description}
++ {data.subscribersCount} +
+Subscribers
++ {data.postsCount} +
+Posts
++ {data.viewsCount} +
+Views
+Moderator: {data.}
*/} +{item.content}
+{item.content}
+Upvotes: {item.upvotesCount}, Downvotes: {item.downvotesCount}
+{item.username}
+Reputation: {item.reputation}
+{item.description}
+{item.content}
+Vote status: {item.voteStatus}, Upvotes: {item.upvotesCount}, Downvotes: {item.downvotesCount}
+{item.content}
+Vote status: {item.voteStatus}, Upvotes: {item.upvotesCount}, Downvotes: {item.downvotesCount}
+No data available.
+ ) + ) : ( +Loading...
+
- Get started by editing
- src/app/page.tsx
-
- Find in-depth information about Next.js features and API. -
- +export default function Home() { + const { toast } = useToast(); + const [value, setValue] = useState(""); + const { quill, quillRef } = useQuill(); + const { allForums, createPost } = useFetcher(); + const { data: forums, error } = useSWR("/forums", allForums); + const form = useForm- Learn about Next.js in an interactive course with quizzes! -
- + async function onSubmit(data: z.infer- Explore starter templates for Next.js. -
- + quill?.setText(""); + } catch (e) { + console.error(e); + toast({ + title: "Error creating post", + description: "An error occurred while creating your post", + }); + } + } - -- Instantly deploy your Next.js site to a shareable URL with Vercel. -
- -+ Reputation: {comment.reputation} +
++ Posted: + {formatDistanceToNow(new Date(comment.createdAt), { addSuffix: true })} +
++ {comment.content} +
+Comment ID: {comment.id}
+Post ID: {comment.postId}
+Parent ID: {comment.parentId}
+ + {showReplyPopup && ( +{user?.username}
+Post: 100
+Forums
+{forum.name}
+ ++ {forum.postsCount} posts +
+{post.title}
+Forums
+{forum.name}
+ ++ {forum.postsCount} posts +
++ {post.title} +
++ {post.content} +
+ {post.attachments.map((attachment) => ( ++ {post.votesCount} +
++ {post.commentsCount} +
++ {post.viewsCount} +
++ {post.votesCount} +
++ {post.commentsCount} +
++ {post.viewsCount} +
++ {post.title} +
++ {post.content} +
+ + Read more + + {post.attachments.map((attachment) => ( ++ {post.votesCount} +
++ {post.commentsCount} +
++ {post.viewsCount} +
++ {post.votesCount} +
++ {post.commentsCount} +
++ {post.viewsCount} +
++ {body} +
+ ) +}) +FormMessage.displayName = "FormMessage" + +export { + useFormField, + Form, + FormItem, + FormLabel, + FormControl, + FormDescription, + FormMessage, + FormField, +} diff --git a/client/src/components/ui/input.tsx b/client/src/components/ui/input.tsx new file mode 100644 index 0000000..b818b79 --- /dev/null +++ b/client/src/components/ui/input.tsx @@ -0,0 +1,24 @@ +import * as React from "react" + +import { cn } from "~/lib/utils" + +export type InputProps = React.InputHTMLAttributes