File tree Expand file tree Collapse file tree 6 files changed +32
-14
lines changed
Expand file tree Collapse file tree 6 files changed +32
-14
lines changed Original file line number Diff line number Diff line change 11import React from "react" ;
22import NextLink from "next/link" ;
3- import { Link as RadixLink } from "@radix-ui/themes" ;
43
54interface Props {
65 href : string ;
76 children : string ;
87}
98export const Link = ( { href, children } : Props ) => {
109 return (
11- < NextLink href = { href } passHref legacyBehavior >
12- < RadixLink className = "text-blue-500 hover:text-blue-700" >
13- { children }
14- </ RadixLink >
10+ < NextLink href = { href } className = "text-purple-500 hover:text-purple-700" >
11+ { children }
1512 </ NextLink >
1613 ) ;
1714} ;
Original file line number Diff line number Diff line change 1+ import IssueFormSkeleton from "../../_components/IssueFormSkeleton" ;
2+
3+ export default IssueFormSkeleton ;
Original file line number Diff line number Diff line change @@ -3,13 +3,15 @@ import { issueSchema } from "@/app/createIssueSchema";
33import { zodResolver } from "@hookform/resolvers/zod" ;
44import { Button , Callout , TextField } from "@radix-ui/themes" ;
55import axios from "axios" ;
6+ import "easymde/dist/easymde.min.css" ;
7+ import SimpleMDE from "react-simplemde-editor" ;
68
79import { useRouter } from "next/navigation" ;
810import { useState } from "react" ;
911import { Controller , useForm } from "react-hook-form" ;
1012
1113import { z } from "zod" ;
12- import { ErrorMessage , Spinner , MarkdownEditor } from "../../components" ;
14+ import { ErrorMessage , Spinner } from "../../components" ;
1315import { Issue } from "@prisma/client" ;
1416
1517type IssueFormData = z . infer < typeof issueSchema > ;
@@ -65,7 +67,7 @@ const IssueForm = ({ issue }: Props) => {
6567 control = { control }
6668 defaultValue = { issue ?. description }
6769 render = { ( { field } ) => (
68- < MarkdownEditor placeholder = "Description" { ...field } />
70+ < SimpleMDE placeholder = "Description" { ...field } />
6971 ) }
7072 />
7173 < ErrorMessage > { errors ?. description ?. message } </ ErrorMessage >
Original file line number Diff line number Diff line change 1+ import { Skeleton } from "@/app/components" ;
2+ import { Box } from "@radix-ui/themes" ;
3+
4+ const IssueFormSkeleton = ( ) => {
5+ return (
6+ < Box >
7+ < Skeleton height = "2rem" />
8+ < Skeleton height = "20rem" />
9+ </ Box >
10+ ) ;
11+ } ;
12+
13+ export default IssueFormSkeleton ;
Original file line number Diff line number Diff line change 1- import React from "react " ;
1+ import IssueFormSkeleton from "../_components/IssueFormSkeleton " ;
22
3- const LoadingNewIssuepage = ( ) => {
4- return < div > LoadingNewIssuepage</ div > ;
5- } ;
6-
7- export default LoadingNewIssuepage ;
3+ export default IssueFormSkeleton ;
Original file line number Diff line number Diff line change 1- import IssueForm from "../_components/IssueForm" ;
1+ "use client" ;
2+ import dynamic from "next/dynamic" ;
3+ import IssueFormSkeleton from "./loading" ;
4+
5+ const IssueForm = dynamic ( ( ) => import ( "../_components/IssueForm" ) , {
6+ ssr : false ,
7+ loading : ( ) => < IssueFormSkeleton /> ,
8+ } ) ;
29
310const NewIssuePage = ( ) => {
411 return < IssueForm /> ;
You can’t perform that action at this time.
0 commit comments