fixed replying variable being weird
This commit is contained in:
parent
02535ec636
commit
2ae7a728b3
|
@ -42,7 +42,7 @@ export async function action({ request, params }) {
|
|||
data: {
|
||||
comment: post,
|
||||
imageName: imageName,
|
||||
replyingTo: parseInt(replying),
|
||||
replyingTo: replying ? parseInt(replying) : null,
|
||||
postId: parseInt(threadId),
|
||||
},
|
||||
});
|
||||
|
@ -54,7 +54,7 @@ export async function loader({ params }) {
|
|||
const threadId = params.threadId;
|
||||
const thread = await prisma.thread.findUnique({
|
||||
where: {
|
||||
id: Number(threadId),
|
||||
id: parseInt(threadId),
|
||||
},
|
||||
include: {
|
||||
posts: true,
|
||||
|
@ -106,7 +106,7 @@ export default function Thread() {
|
|||
Image: <input accept="image/*" type="file" name="image" id="image-upload" />
|
||||
</label>
|
||||
<input className="hidden" type="number" name="replying" value={replying} />
|
||||
<button className="bg-white p-2 rounded-full" type="submit">Submit</button>
|
||||
<button className="bg-white px-4 py-2 shadow rounded-full" type="submit">Submit</button>
|
||||
</Form>
|
||||
</Overlay>
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue