Implemented suggestions by Matthieu

This commit is contained in:
Andreas
2024-01-01 10:31:43 +07:00
parent c66385b0d0
commit c603e279df
9 changed files with 65 additions and 106 deletions

View File

@@ -18,11 +18,11 @@ import { SESSION_COOKIE_NAME } from "../lib/fief";
const poppins = Poppins({ subsets: ["latin"], weight: ["200", "400", "600"] });
export const viewport: Viewport = {
themeColor: 'black',
themeColor: "black",
width: "device-width",
initialScale: 1,
maximumScale: 1,
}
};
export const metadata: Metadata = {
metadataBase: new URL(process.env.DEV_URL || "https://reflector.media"),

View File

@@ -75,8 +75,7 @@ const TranscriptRecord = (details: TranscriptDetails) => {
}, [webSockets.status.value, transcript.response?.status]);
useEffect(() => {
if (transcript.response?.status === "ended")
mp3.getNow();
if (transcript.response?.status === "ended") mp3.getNow();
}, [transcript.response]);
useEffect(() => {

View File

@@ -35,7 +35,7 @@ const useCreateTranscript = (): UseTranscript => {
);
setErrorState(err);
setLoading(false);
})
});
};
return { transcript, loading, error, create };

View File

@@ -21,8 +21,7 @@ export default function FileUploadButton(props: FileUploadButton) {
console.log("Calling api.v1TranscriptRecordUpload()...");
// Create an object of the expected type
const uploadData: Body_transcript_record_upload_v1_transcripts__transcript_id__record_upload_post =
{
const uploadData = {
file: file,
// Add other properties if required by the type definition
};

View File

@@ -86,7 +86,6 @@ const ShareLink = (props: ShareLinkProps) => {
)}
{isOwner && api && (
<div className="relative">
<SelectSearch
className="select-search--top select-search"

View File

@@ -59,7 +59,7 @@ export const useWebSockets = (transcriptId: string | null): UseWebSockets => {
useEffect(() => {
document.onkeyup = (e) => {
if (e.key === "a" && process.env.NEXT_PUBLIC_ENV === "development") {
const segments : GetTranscriptSegmentTopic[] = [
const segments: GetTranscriptSegmentTopic[] = [
{
speaker: 1,
start: 0,
@@ -89,7 +89,7 @@ export const useWebSockets = (transcriptId: string | null): UseWebSockets => {
speaker: 6,
start: 300,
text: "This is the sixth speaker",
}
},
];
setTranscriptText("Lorem Ipsum");
@@ -310,8 +310,7 @@ export const useWebSockets = (transcriptId: string | null): UseWebSockets => {
if (!transcriptId || !api) return;
api?.v1TranscriptGetWebsocketEvents(transcriptId).then((result) => {
});
api?.v1TranscriptGetWebsocketEvents(transcriptId).then((result) => {});
const url = `${websocket_url}/v1/transcripts/${transcriptId}/events`;
let ws = new WebSocket(url);

View File

@@ -8,8 +8,7 @@
"start": "next start",
"lint": "next lint",
"format": "prettier --write .",
"openapi": "openapi --input http://127.0.0.1:1250/openapi.json --name OpenApi --output app/api && yarn format",
"openapi-old": "openapi-generator-cli generate -i http://localhost:1250/openapi.json -g typescript-fetch -o app/api && yarn format"
"openapi": "openapi --input http://127.0.0.1:1250/openapi.json --name OpenApi --output app/api && yarn format"
},
"dependencies": {
"@fief/fief": "^0.13.5",
@@ -47,7 +46,6 @@
"devDependencies": {
"@openapitools/openapi-generator-cli": "^2.7.0",
"@types/react": "18.2.20",
"openapi-typescript": "^6.7.3",
"openapi-typescript-codegen": "^0.25.0",
"prettier": "^3.0.0"
}

View File

@@ -19,8 +19,7 @@
}
],
"strictNullChecks": true,
"downlevelIteration": true,
"target": "ES2020"
"downlevelIteration": true
},
"include": ["next-env.d.ts", ".next/types/**/*.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]

View File

@@ -31,11 +31,6 @@
dependencies:
regenerator-runtime "^0.14.0"
"@fastify/busboy@^2.0.0":
version "2.1.0"
resolved "https://registry.yarnpkg.com/@fastify/busboy/-/busboy-2.1.0.tgz#0709e9f4cb252351c609c6e6d8d6779a8d25edff"
integrity sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA==
"@fief/fief@^0.13.5":
version "0.13.5"
resolved "https://registry.yarnpkg.com/@fief/fief/-/fief-0.13.5.tgz#01ac833ddff0b84f2e1737cc168721568b0e7a39"
@@ -613,11 +608,6 @@ agent-base@6:
dependencies:
debug "4"
ansi-colors@^4.1.3:
version "4.1.3"
resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b"
integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==
ansi-escapes@^4.2.1:
version "4.3.2"
resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e"
@@ -1532,7 +1522,7 @@ fast-glob@^3.2.12:
merge2 "^1.3.0"
micromatch "^4.0.4"
fast-glob@^3.2.9, fast-glob@^3.3.1, fast-glob@^3.3.2:
fast-glob@^3.2.9, fast-glob@^3.3.1:
version "3.3.2"
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129"
integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==
@@ -2844,18 +2834,6 @@ openapi-typescript-codegen@^0.25.0:
handlebars "^4.7.7"
json-schema-ref-parser "^9.0.9"
openapi-typescript@^6.7.3:
version "6.7.3"
resolved "https://registry.yarnpkg.com/openapi-typescript/-/openapi-typescript-6.7.3.tgz#7fe131a28551c8996e4a680e4698d0e1206635ba"
integrity sha512-es3mGcDXV6TKPo6n3aohzHm0qxhLyR39MhF6mkD1FwFGjhxnqMqfSIgM0eCpInZvqatve4CxmXcMZw3jnnsaXw==
dependencies:
ansi-colors "^4.1.3"
fast-glob "^3.3.2"
js-yaml "^4.1.0"
supports-color "^9.4.0"
undici "^5.28.2"
yargs-parser "^21.1.1"
ora@^5.4.1:
version "5.4.1"
resolved "https://registry.yarnpkg.com/ora/-/ora-5.4.1.tgz#1b2678426af4ac4a509008e5e4ac9e9959db9e18"
@@ -3734,13 +3712,6 @@ unbox-primitive@^1.0.2:
has-symbols "^1.0.3"
which-boxed-primitive "^1.0.2"
undici@^5.28.2:
version "5.28.2"
resolved "https://registry.yarnpkg.com/undici/-/undici-5.28.2.tgz#fea200eac65fc7ecaff80a023d1a0543423b4c91"
integrity sha512-wh1pHJHnUeQV5Xa8/kyQhO7WFa8M34l026L5P/+2TYiakvGy5Rdc8jWZVyG7ieht/0WgJLEd3kcU5gKx+6GC8w==
dependencies:
"@fastify/busboy" "^2.0.0"
unified@^11.0.0:
version "11.0.3"
resolved "https://registry.yarnpkg.com/unified/-/unified-11.0.3.tgz#e141be0fe466a2d28b2160f62712bc9cbc08fdd4"
@@ -3961,11 +3932,6 @@ yargs-parser@^20.2.2:
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee"
integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==
yargs-parser@^21.1.1:
version "21.1.1"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35"
integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==
yargs@^16.2.0:
version "16.2.0"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66"