fix cors again, print better date

This commit is contained in:
Sasha 2023-12-02 18:09:46 +01:00
parent b9814780ec
commit 65756f0663
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,6 @@ import React from "react";
import { Block } from "@/components/Block"; import { Block } from "@/components/Block";
import { Subtitle } from "@/components/Subtitle"; import { Subtitle } from "@/components/Subtitle";
import { Button } from "@/components/Button"; import { Button } from "@/components/Button";
import { Status } from "@/components/Status";
import { MessageContent, useWaku } from "@/hooks"; import { MessageContent, useWaku } from "@/hooks";
import { CONTENT_TOPIC } from "@/constants"; import { CONTENT_TOPIC } from "@/constants";
@ -107,7 +106,7 @@ function renderMessage(content: MessageContent) {
<p> <p>
<span className="text-lg">{content.nick}</span> <span className="text-lg">{content.nick}</span>
<span className="text-sm font-bold"> <span className="text-sm font-bold">
({(new Date(content.timestamp)).toString()}) ({(new Date(content.timestamp)).toDateString()})
</span> </span>
: :
</p> </p>

View File

@ -2,6 +2,7 @@ export const http = {
post(url: string, body: any) { post(url: string, body: any) {
return fetch(new URL(url), { return fetch(new URL(url), {
method: "POST", method: "POST",
mode: "no-cors",
referrerPolicy: "no-referrer", referrerPolicy: "no-referrer",
headers: { headers: {
'Content-Type': 'text/plain', 'Content-Type': 'text/plain',