+
Sign In
-
>
- )
-}
+ );
+};
export default HeaderCurio;
diff --git a/src/components/Header/header.css b/src/components/Header/header.css
index 31b8790..a12296a 100644
--- a/src/components/Header/header.css
+++ b/src/components/Header/header.css
@@ -1,5 +1,4 @@
-
-.curio__header{
+.curio__header {
font-family: Manrope;
display: none;
justify-content: space-between;
@@ -7,52 +6,49 @@
padding: 2rem 4rem;
}
-.gradient__text-m{
+.gradient__text-m {
display: flex;
flex-direction: column;
-
}
-.display-none{
+.display-none {
display: none;
}
-.hamburger-m{
-display: flex;
-flex-direction: column;
-height: 5vw;
-width: 8vw;
-gap: 1vw;
-background-color: rgba(0, 0, 0, 0);
-transition-duration: .2s;
-
-
+.hamburger-m {
+ display: flex;
+ flex-direction: column;
+ height: 5vw;
+ width: 8vw;
+ gap: 1vw;
+ background-color: rgba(0, 0, 0, 0);
+ transition-duration: 0.2s;
}
-.lines-rotated-left-m{
+.lines-rotated-left-m {
height: 1.2vw;
width: 8vw;
position: absolute;
transform: rotate(50deg);
- background-image: linear-gradient(to right,purple, pink);
+ background-image: linear-gradient(to right, purple, pink);
}
-.lines-rotated-right-m{
+.lines-rotated-right-m {
height: 1.2vw;
width: 8vw;
position: absolute;
transform: rotate(-50deg);
- background-image: linear-gradient(to right,purple, pink);
+ background-image: linear-gradient(to right, purple, pink);
}
-.hamburger-m:active{
- opacity: .6;
+.hamburger-m:active {
+ opacity: 0.6;
}
-.hamburger-m:hover{
- opacity: .6;
+.hamburger-m:hover {
+ opacity: 0.6;
}
-.hamburger-lines-m{
+.hamburger-lines-m {
height: 2vw;
width: 8vw;
- background-image: linear-gradient(to right,purple, pink);
+ background-image: linear-gradient(to right, purple, pink);
}
-.curio__header-m{
+.curio__header-m {
font-family: Manrope;
display: flex;
flex-direction: row;
@@ -62,13 +58,12 @@ transition-duration: .2s;
width: 80vw;
align-items: center;
margin-left: 10vw;
-
}
-.hamburger-menu-context{
+.hamburger-menu-context {
color: white;
- transition-duration: .2s;
+ transition-duration: 0.2s;
}
-.hamburger-menu-active{
+.hamburger-menu-active {
display: flex;
flex-direction: column;
justify-content: space-around;
@@ -82,41 +77,39 @@ transition-duration: .2s;
font-size: 1.1rem;
font-family: Manrope;
}
-.hamburger-menu-context:active{
- opacity: .2;
-
+.hamburger-menu-context:active {
+ opacity: 0.2;
}
-.hamburger-menu-context:hover{
- opacity: .2;
-
+.hamburger-menu-context:hover {
+ opacity: 0.2;
}
-.gradient__text{
+.gradient__text {
background: var(--gradient-text);
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
-.curio__icon{
+.curio__icon {
height: 12.5mm;
margin-bottom: 0.6rem;
}
-.curio__tag{
+.curio__tag {
padding-right: 4.5rem;
}
-.curio_tag-m{
+.curio_tag-m {
display: flex;
flex-direction: column;
}
-.curio__sign{
+.curio__sign {
display: flex;
justify-content: flex-end;
align-items: center;
}
-.curio__sign p{
- color: #FFF;
+.curio__sign p {
+ color: #fff;
font-family: var(--font-family);
font-weight: 500;
font-size: 18px;
@@ -127,9 +120,9 @@ transition-duration: .2s;
cursor: pointer;
}
-.curio__sign button{
+.curio__sign button {
padding: 0.5rem 1rem;
- color: #FFF;
+ color: #fff;
font-family: var(--font-family);
font-weight: 500;
font-size: 18px;
@@ -139,7 +132,7 @@ transition-duration: .2s;
left: 1153px;
top: 55px;
- background: #FF4820;
+ background: #ff4820;
border-radius: 5px;
}
@@ -157,5 +150,4 @@ transition-duration: .2s;
[class="hamburger-menu-active"] {
display: none;
}
-
}
diff --git a/src/components/Recorder/Recorder.css b/src/components/Recorder/Recorder.css
index 84e91fc..d4b07a8 100644
--- a/src/components/Recorder/Recorder.css
+++ b/src/components/Recorder/Recorder.css
@@ -1,165 +1,190 @@
-.recordedAudios{
- justify-content: space-around;
- display: inline-flex;
- flex-wrap: wrap;
- width: 100%;
+.recordedAudios {
+ justify-content: space-around;
+ display: inline-flex;
+ flex-wrap: wrap;
+ width: 100%;
}
.record_start button {
- width: 50%;
- min-height: 50px;
- font-family: var(--font-family);
- font-weight: 400;
- font-size: 20px;
- line-height: 28px;
- background: #31b425;
- border: 2px solid #31b425;
- padding: 0 1rem;
- color: #fff;
- cursor: pointer;
- outline: none;
- /* border-radius: 0%; */
-
- border-top-right-radius: 0;
- border-bottom-right-radius: 0;
+ width: 50%;
+ min-height: 50px;
+ font-family: var(--font-family);
+ font-weight: 400;
+ font-size: 20px;
+ line-height: 28px;
+ background: #31b425;
+ border: 2px solid #31b425;
+ padding: 0 1rem;
+ color: #fff;
+ cursor: pointer;
+ outline: none;
+ /* border-radius: 0%; */
+
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
}
.record_stop button {
- width: 50%;
- min-height: 50px;
- font-family: var(--font-family);
- font-weight: 400;
- font-size: 20px;
- line-height: 28px;
- background: #FF4820;
- border: 2px solid #FF4820;
- padding: 0 1rem;
- color: #fff;
- cursor: pointer;
- outline: none;
-
- border-top-left-radius: 0;
- border-bottom-left-radius: 0;
+ width: 50%;
+ min-height: 50px;
+ font-family: var(--font-family);
+ font-weight: 400;
+ font-size: 20px;
+ line-height: 28px;
+ background: #ff4820;
+ border: 2px solid #ff4820;
+ padding: 0 1rem;
+ color: #fff;
+ cursor: pointer;
+ outline: none;
+
+ border-top-left-radius: 0;
+ border-bottom-left-radius: 0;
}
-.upload_button{
- display: flex;
- justify-content: center;
+.upload_button {
+ display: flex;
+ justify-content: center;
}
.upload_button button {
- width: 50%;
- min-height: 50px;
- font-family: var(--font-family);
- font-weight: 400;
- font-size: 20px;
- line-height: 28px;
- background: #31b425;
- border: 2px solid #31b425;
- padding: 0 1rem;
- color: #fff;
- cursor: pointer;
- outline: none;
- /* border-radius: 0%;
+ width: 50%;
+ min-height: 50px;
+ font-family: var(--font-family);
+ font-weight: 400;
+ font-size: 20px;
+ line-height: 28px;
+ background: #31b425;
+ border: 2px solid #31b425;
+ padding: 0 1rem;
+ color: #fff;
+ cursor: pointer;
+ outline: none;
+ /* border-radius: 0%;
border-top-right-radius: 5px;
border-bottom-right-radius: 5px; */
}
-.duration Input{
- display: flex;
- flex: 2;
- width: 100%;
- min-height: 50px;
- font-family: var(--font-family);
- background: var(--color-footer);
- border: 2px solid var(--color-footer);
- padding: 0 1rem;
- outline: none;
- color: #fff;
- /* border-radius: 5px 0px 0px 5px; */
- font-style: normal;
- font-weight: normal;
- font-size: 20px;
- line-height: 27px;
- color: #3D6184;
+.duration Input {
+ display: flex;
+ flex: 2;
+ width: 100%;
+ min-height: 50px;
+ font-family: var(--font-family);
+ background: var(--color-footer);
+ border: 2px solid var(--color-footer);
+ padding: 0 1rem;
+ outline: none;
+ color: #fff;
+ /* border-radius: 5px 0px 0px 5px; */
+ font-style: normal;
+ font-weight: normal;
+ font-size: 20px;
+ line-height: 27px;
+ color: #3d6184;
}
-.duration{
- padding: 0 3rem;
+.duration {
+ padding: 0 3rem;
}
-.duration button{
- flex: 0.6;
- width: 100%;
- min-height: 50px;
- font-family: var(--font-family);
- font-weight: 400;
- font-size: 20px;
- line-height: 28px;
- background: #FF4820;
- border: 2px solid #FF4820;
- padding: 0 1rem;
- color: #fff;
- cursor: default;
- outline: none;
- justify-content: center;
- /* border-top-right-radius: 5px;
+.duration button {
+ flex: 0.6;
+ width: 100%;
+ min-height: 50px;
+ font-family: var(--font-family);
+ font-weight: 400;
+ font-size: 20px;
+ line-height: 28px;
+ background: #ff4820;
+ border: 2px solid #ff4820;
+ padding: 0 1rem;
+ color: #fff;
+ cursor: default;
+ outline: none;
+ justify-content: center;
+ /* border-top-right-radius: 5px;
border-bottom-right-radius: 5px; */
}
.duration_input {
- width: 100%;
- margin: 2rem 0 1rem;
+ width: 100%;
+ margin: 2rem 0 1rem;
- display: flex;
- flex-direction: row;
+ display: flex;
+ flex-direction: row;
}
.record_grad {
- margin: 10px;
- border-radius: 10px;
- display: flex;
- flex-direction: column;
-
- padding: 2rem;
- background: var(--color-footer);
-
- /* ff 3.6+ */
- background:-moz-radial-gradient(circle at 30% -100%, #042c54 25%, rgba(4, 44, 84, 1) 85%, rgba(27, 120, 222, 1) 100%);
-
- /* safari 5.1+,chrome 10+ */
- background:-webkit-radial-gradient(circle at 30% -100%, #042c54 25%, rgba(4, 44, 84, 1) 85%, rgba(27, 120, 222, 1) 100%);
-
- /* opera 11.10+ */
- background:-o-radial-gradient(circle at 30% -100%, #042c54 25%, rgba(4, 44, 84, 1) 85%, rgba(27, 120, 222, 1) 100%);
-
- /* ie 10+ */
- background:-ms-radial-gradient(circle at 30% -100%, #042c54 25%, rgba(4, 44, 84, 1) 85%, rgba(27, 120, 222, 1) 100%);
-
- /* global 92%+ browsers support */
- background:radial-gradient(circle at 30% -100%, #042c54 25%, rgba(4, 44, 84, 1) 85%, rgba(27, 120, 222, 1) 100%);
-
- filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25));
+ margin: 10px;
+ border-radius: 10px;
+ display: flex;
+ flex-direction: column;
+
+ padding: 2rem;
+ background: var(--color-footer);
+
+ /* ff 3.6+ */
+ background: -moz-radial-gradient(
+ circle at 30% -100%,
+ #042c54 25%,
+ rgba(4, 44, 84, 1) 85%,
+ rgba(27, 120, 222, 1) 100%
+ );
+
+ /* safari 5.1+,chrome 10+ */
+ background: -webkit-radial-gradient(
+ circle at 30% -100%,
+ #042c54 25%,
+ rgba(4, 44, 84, 1) 85%,
+ rgba(27, 120, 222, 1) 100%
+ );
+
+ /* opera 11.10+ */
+ background: -o-radial-gradient(
+ circle at 30% -100%,
+ #042c54 25%,
+ rgba(4, 44, 84, 1) 85%,
+ rgba(27, 120, 222, 1) 100%
+ );
+
+ /* ie 10+ */
+ background: -ms-radial-gradient(
+ circle at 30% -100%,
+ #042c54 25%,
+ rgba(4, 44, 84, 1) 85%,
+ rgba(27, 120, 222, 1) 100%
+ );
+
+ /* global 92%+ browsers support */
+ background: radial-gradient(
+ circle at 30% -100%,
+ #042c54 25%,
+ rgba(4, 44, 84, 1) 85%,
+ rgba(27, 120, 222, 1) 100%
+ );
+
+ filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25));
}
-.recorder_status{
- display: flex;
- justify-content: center;
- font-family: var(--font-family);
+.recorder_status {
+ display: flex;
+ justify-content: center;
+ font-family: var(--font-family);
}
-.recorded_audios{
- color : #FF8A71;
+.recorded_audios {
+ color: #ff8a71;
}
.merged {
- display: flex;
- justify-content: center;
- color: var(--color-footer);
+ display: flex;
+ justify-content: center;
+ color: var(--color-footer);
}
.merged_audio {
- display: flex;
- justify-content: center;
+ display: flex;
+ justify-content: center;
+}
+.merged_audio audio {
+ width: 90%;
}
-.merged_audio audio{
- width: 90%;
-}
\ No newline at end of file
diff --git a/src/components/Recorder/Recorder.tsx b/src/components/Recorder/Recorder.tsx
index bff7efc..d4f8d39 100644
--- a/src/components/Recorder/Recorder.tsx
+++ b/src/components/Recorder/Recorder.tsx
@@ -1,164 +1,193 @@
import { ReactMediaRecorder } from "react-media-recorder";
import React, { useState } from "react";
-import { Button } from 'rsuite';
-import { Input} from 'rsuite';
-import './Recorder.css'
-import UploadAudio from './UploadAudio';
+import { Button } from "rsuite";
+import { Input } from "rsuite";
+import "./Recorder.css";
+import UploadAudio from "./UploadAudio";
const RecordView = (props: any) => {
+ const [audios, setAudios] = useState
>([]);
+ const [merged, setMerged] = useState(undefined);
+ const [duration, setDuration] = useState(0);
+ const [recFrom, setFrom] = useState(0);
+ const merge = (audios: Array<{ src: string; blob: Blob }>) => {
+ var buffers: Array = [];
- const [audios, setAudios] = useState>([]);
- const [merged, setMerged] = useState(undefined);
- const [duration, setDuration] = useState(0);
- const [recFrom, setFrom] = useState(0);
- const merge = (audios: Array<{ src: string; blob: Blob }>) => {
- var buffers: Array = [];
+ var index = 0;
- var index = 0;
-
- function readAsArrayBuffer() {
- if (!audios[index]) {
- return concatenateBuffers();
- }
- var reader = new FileReader();
- reader.onload = function (event) {
- if (event.target) {
- const result = event.target.result;
- if (result instanceof ArrayBuffer) {
- buffers.push(result);
- }
- }
- index++;
- readAsArrayBuffer();
- };
- // console.log(audios);
- reader.readAsArrayBuffer(audios[index].blob);
+ function readAsArrayBuffer() {
+ if (!audios[index]) {
+ return concatenateBuffers();
+ }
+ var reader = new FileReader();
+ reader.onload = function (event) {
+ if (event.target) {
+ const result = event.target.result;
+ if (result instanceof ArrayBuffer) {
+ buffers.push(result);
+ }
}
-
+ index++;
readAsArrayBuffer();
+ };
+ // console.log(audios);
+ reader.readAsArrayBuffer(audios[index].blob);
+ }
- function concatenateBuffers() {
- var byteLength = 0;
- buffers.forEach(function (buffer) {
- byteLength += buffer.byteLength;
- });
-
- var tmp = new Uint16Array(byteLength);
- var lastOffset = 0;
- buffers.forEach(function (buffer) {
- // BYTES_PER_ELEMENT == 2 for Uint16Array
- var reusableByteLength = buffer.byteLength;
- if (reusableByteLength % 2 !== 0) {
- buffer = buffer.slice(0, reusableByteLength - 1)
- }
- tmp.set(new Uint16Array(buffer), lastOffset);
- lastOffset += reusableByteLength;
- });
+ readAsArrayBuffer();
- var blob = new Blob([tmp.buffer], {
- type: 'audio/wav'
- });
+ function concatenateBuffers() {
+ var byteLength = 0;
+ buffers.forEach(function (buffer) {
+ byteLength += buffer.byteLength;
+ });
- setMerged(blob);
- console.log(blob);
+ var tmp = new Uint16Array(byteLength);
+ var lastOffset = 0;
+ buffers.forEach(function (buffer) {
+ // BYTES_PER_ELEMENT == 2 for Uint16Array
+ var reusableByteLength = buffer.byteLength;
+ if (reusableByteLength % 2 !== 0) {
+ buffer = buffer.slice(0, reusableByteLength - 1);
}
- }
+ tmp.set(new Uint16Array(buffer), lastOffset);
+ lastOffset += reusableByteLength;
+ });
- const startRec = () => {
- console.log('audio started')
- }
-
- const stopRec = (url: string, blob: Blob) => {
- console.log('audio stopped')
- let audios1 = audios
- audios1.push({
- src: url,
- blob,
- })
- console.log(audios1);
- setAudios(audios1)
- merge(audios1)
+ var blob = new Blob([tmp.buffer], {
+ type: "audio/wav",
+ });
+
+ setMerged(blob);
+ console.log(blob);
}
+ };
+
+ const startRec = () => {
+ console.log("audio started");
+ };
+
+ const stopRec = (url: string, blob: Blob) => {
+ console.log("audio stopped");
+ let audios1 = audios;
+ audios1.push({
+ src: url,
+ blob,
+ });
+ console.log(audios1);
+ setAudios(audios1);
+ merge(audios1);
+ };
- return (
+ return (
<>
-
- {merged && audios.length > 1 &&
Merged Audio }
- {merged && audios.length > 1 &&
}
- {merged && audios.length > 1 &&
}
-
+
+ {merged && audios.length > 1 && (
+
+ Merged Audio
+
+ )}
+ {merged && audios.length > 1 && (
+
+
+
+ )}
+
+ {merged && audios.length > 1 &&
}
+
+
+
+
+
(
+
+
+
+ The recorder is Currently {status}
+
+
-
-
(
-
-
The recorder is Currently {status}
-
-
+
-
-
- { startRecording();
- if(duration !== 0){
- console.log(duration);
- setTimeout(stopRecording, duration * 1000)
- }
- }}>
- Start Recording
-
-
- Stop Recording
-
-
-
- )}
- />
-
Recorded Audios
-
- {audios.map(audio => {
- return (
-
- )
- })}
+
+
+ {
+ startRecording();
+ if (duration !== 0) {
+ console.log(duration);
+ setTimeout(stopRecording, duration * 1000);
+ }
+ }}
+ >
+ Start Recording
+
+
+
+ Stop Recording
+
+
+ )}
+ />
+
+
Recorded Audios
+
+
+ {audios.map((audio) => {
+ return (
+
+ );
+ })}
+
>
- )
-}
+ );
+};
-export default RecordView;
\ No newline at end of file
+export default RecordView;
diff --git a/src/components/Recorder/Recorder_old.js b/src/components/Recorder/Recorder_old.js
index b0b2132..0760011 100644
--- a/src/components/Recorder/Recorder_old.js
+++ b/src/components/Recorder/Recorder_old.js
@@ -1,14 +1,13 @@
import { useReactMediaRecorder } from "react-media-recorder";
import React, { useEffect, useState } from "react";
-import { Button } from 'rsuite';
-
+import { Button } from "rsuite";
const RecordView = (props) => {
const [second, setSecond] = useState("00");
const [minute, setMinute] = useState("00");
const [isActive, setIsActive] = useState(false);
const [counter, setCounter] = useState(0);
- var [audios , setAudios] = useState([]);
+ var [audios, setAudios] = useState([]);
useEffect(() => {
let intervalId;
@@ -54,82 +53,80 @@ const RecordView = (props) => {
} = useReactMediaRecorder({
video: false,
audio: true,
- echoCancellation: true
+ echoCancellation: true,
});
// console.log("Audio", mediaBlobUrl);
const updateAudios = () => {
- if(mediaBlobUrl === undefined) return
+ if (mediaBlobUrl === undefined) return;
- setAudios(audios => [...audios , mediaBlobUrl]);
+ setAudios((audios) => [...audios, mediaBlobUrl]);
console.log(audios);
- }
-
+ };
const AudioList = () => {
- const renderedAudios = audios.map((audio , index)=> {
- return
+ const renderedAudios = audios.map((audio, index) => {
+ return
;
});
- return
{renderedAudios}
- }
+ return
{renderedAudios}
;
+ };
const merge = () => {
- ConcatenateBlobs(audios,'audio/wav',showonscreen())
- }
-
+ ConcatenateBlobs(audios, "audio/wav", showonscreen());
+ };
- function ConcatenateBlobs (blobs, type, callback) {
+ function ConcatenateBlobs(blobs, type, callback) {
var buffers = [];
var index = 0;
function readAsArrayBuffer() {
- if (!blobs[index]) {
- return concatenateBuffers();
- }
- var reader = new FileReader();
- reader.onload = function(event) {
- buffers.push(event.target.result);
- index++;
- readAsArrayBuffer();
- };
- reader.readAsArrayBuffer(blobs[index]);
+ if (!blobs[index]) {
+ return concatenateBuffers();
+ }
+ var reader = new FileReader();
+ reader.onload = function (event) {
+ buffers.push(event.target.result);
+ index++;
+ readAsArrayBuffer();
+ };
+ reader.readAsArrayBuffer(blobs[index]);
}
readAsArrayBuffer();
function concatenateBuffers() {
- var byteLength = 0;
- buffers.forEach(function(buffer) {
- byteLength += buffer.byteLength;
- });
-
- var tmp = new Uint16Array(byteLength);
- var lastOffset = 0;
- buffers.forEach(function(buffer) {
- // BYTES_PER_ELEMENT == 2 for Uint16Array
- var reusableByteLength = buffer.byteLength;
- if (reusableByteLength % 2 !== 0) {
- buffer = buffer.slice(0, reusableByteLength - 1)
- }
- tmp.set(new Uint16Array(buffer), lastOffset);
- lastOffset += reusableByteLength;
- });
-
- var blob = new Blob([tmp.buffer], {
- type: type
- });
-
- callback(blob);
+ var byteLength = 0;
+ buffers.forEach(function (buffer) {
+ byteLength += buffer.byteLength;
+ });
+
+ var tmp = new Uint16Array(byteLength);
+ var lastOffset = 0;
+ buffers.forEach(function (buffer) {
+ // BYTES_PER_ELEMENT == 2 for Uint16Array
+ var reusableByteLength = buffer.byteLength;
+ if (reusableByteLength % 2 !== 0) {
+ buffer = buffer.slice(0, reusableByteLength - 1);
+ }
+ tmp.set(new Uint16Array(buffer), lastOffset);
+ lastOffset += reusableByteLength;
+ });
+
+ var blob = new Blob([tmp.buffer], {
+ type: type,
+ });
+
+ callback(blob);
}
}
- if(typeof modules !== 'undefined') {
- module.export = ConcatenateBlobs;
+ if (typeof modules !== "undefined") {
+ module.export = ConcatenateBlobs;
}
- if(typeof window !== 'undefined') {
- window.ConcatenateBlobs = ConcatenateBlobs;
+ if (typeof window !== "undefined") {
+ window.ConcatenateBlobs = ConcatenateBlobs;
}
function showonscreen(bb) {
@@ -137,15 +134,11 @@ const RecordView = (props) => {
}
return (
-
- {status}
-
- {/*
*/}
-
+
{status}
+ {/*
*/}
+
-
- Clear
-
+
Clear
{minute}
@@ -153,22 +146,41 @@ const RecordView = (props) => {
{second}
-
-
- Press the Start to record
-
-
-
- { if (!isActive) { startRecording(); } else { pauseRecording(); } setIsActive(!isActive); }} >
- {isActive ? "Pause" : "Start"}
-
- { pauseRecording(); stopRecording(); setIsActive(!isActive); updateAudios();}}>
- Stop
-
-
- {merge()}}>Merge
- {/* {mergeAudio()}}>Merge */}
+ Press the Start to record
+
+
+ {
+ if (!isActive) {
+ startRecording();
+ } else {
+ pauseRecording();
+ }
+ setIsActive(!isActive);
+ }}
+ >
+ {isActive ? "Pause" : "Start"}
+
+ {
+ pauseRecording();
+ stopRecording();
+ setIsActive(!isActive);
+ updateAudios();
+ }}
+ >
+ Stop
+
+
+ {
+ merge();
+ }}
+ >
+ Merge
+
+ {/* {mergeAudio()}}>Merge */}
diff --git a/src/components/Recorder/UploadAudio.tsx b/src/components/Recorder/UploadAudio.tsx
index 3737fa1..8c8b6c4 100644
--- a/src/components/Recorder/UploadAudio.tsx
+++ b/src/components/Recorder/UploadAudio.tsx
@@ -1,9 +1,9 @@
-import 'react-dropzone-uploader/dist/styles.css'
-import axios from 'axios'
-import React, { useState } from 'react'
-import { Button } from 'rsuite'
-import { useParams } from 'react-router-dom';
-import './Recorder.css'
+import "react-dropzone-uploader/dist/styles.css";
+import axios from "axios";
+import React, { useState } from "react";
+import { Button } from "rsuite";
+import { useParams } from "react-router-dom";
+import "./Recorder.css";
interface UploadAudioProps {
audio: Blob;
@@ -16,36 +16,45 @@ const UploadAudio: React.FC
= ({ audio }) => {
const sFile = () => {
setFile(audio);
- }
+ };
const UPKEY = process.env.REACT_APP_UP;
- console.log(file)
- const API_ENDPOINT = `${UPKEY}${vidId}`
-
+ console.log(file);
+ const API_ENDPOINT = `${UPKEY}${vidId}`;
+
const handleSubmit = async () => {
console.log(file);
// * GET request: presigned URL
const response = await axios({
- method: 'GET',
+ method: "GET",
url: API_ENDPOINT,
- })
- console.log('Response: ', response)
+ });
+ console.log("Response: ", response);
// * PUT request: upload file to S3
const result = await fetch(response.data.uploadURL, {
- method: 'PUT',
+ method: "PUT",
body: file,
- })
- console.log('Result: ', result)
- }
+ });
+ console.log("Result: ", result);
+ };
return (
<>
- { sFile(); handleSubmit(); }}>Upload Audio
+
+ {
+ sFile();
+ handleSubmit();
+ }}
+ >
+ Upload Audio
+
+
>
- )
-}
+ );
+};
export default UploadAudio;
diff --git a/src/components/Recorder/UploadAudio_old.js b/src/components/Recorder/UploadAudio_old.js
index 6f02e41..e4bd3c9 100644
--- a/src/components/Recorder/UploadAudio_old.js
+++ b/src/components/Recorder/UploadAudio_old.js
@@ -1,56 +1,64 @@
-import React ,{useState} from 'react';
-import AWS from 'aws-sdk'
-import { Button } from 'rsuite';
-
-
-const S3_BUCKET ='be-bucket-public';
-const REGION ='ap-south-1';
+import React, { useState } from "react";
+import AWS from "aws-sdk";
+import { Button } from "rsuite";
+const S3_BUCKET = "be-bucket-public";
+const REGION = "ap-south-1";
AWS.config.update({
- accessKeyId: 'AKIA27OR2MLKGPC5F2GN',
- secretAccessKey: '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'
-})
+ accessKeyId: "...",
+ secretAccessKey: "...",
+});
const myBucket = new AWS.S3({
- params: { Bucket: S3_BUCKET},
- region: REGION,
-})
+ params: { Bucket: S3_BUCKET },
+ region: REGION,
+});
const UploadAudio = (props) => {
- let smth = props.audio.size.toString();
- console.log(smth);
- const [progress , setProgress] = useState(0);
- const [selectedFile, setSelectedFile] = useState(null);
-
- const handleFileInput = () => {
- setSelectedFile(props.audio);
- }
-
- const uploadFile = (file) => {
-
- const params = {
- ACL: 'public-read',
- Body: file,
- Bucket: S3_BUCKET,
- Key: smth
- };
-
- myBucket.putObject(params)
- .on('httpUploadProgress', (evt) => {
- setProgress(Math.round((evt.loaded / evt.total) * 100))
- })
- .send((err) => {
- if (err) console.log(err)
- })
- }
-
-
- return
-
Your Audio Upload Progress is {progress}%
- {/*
*/}
-
{uploadFile(selectedFile); handleFileInput()} }>Upload The Recorded Audio
+ let smth = props.audio.size.toString();
+ console.log(smth);
+ const [progress, setProgress] = useState(0);
+ const [selectedFile, setSelectedFile] = useState(null);
+
+ const handleFileInput = () => {
+ setSelectedFile(props.audio);
+ };
+
+ const uploadFile = (file) => {
+ const params = {
+ ACL: "public-read",
+ Body: file,
+ Bucket: S3_BUCKET,
+ Key: smth,
+ };
+
+ myBucket
+ .putObject(params)
+ .on("httpUploadProgress", (evt) => {
+ setProgress(Math.round((evt.loaded / evt.total) * 100));
+ })
+ .send((err) => {
+ if (err) console.log(err);
+ });
+ };
+
+ return (
+
+
+
Your Audio Upload Progress is {progress}%
+
+ {/*
*/}
+
{
+ uploadFile(selectedFile);
+ handleFileInput();
+ }}
+ >
+ Upload The Recorded Audio
+
-}
+ );
+};
-export default UploadAudio;
\ No newline at end of file
+export default UploadAudio;
diff --git a/src/components/UnderHeader/APIError.css b/src/components/UnderHeader/APIError.css
new file mode 100644
index 0000000..236323e
--- /dev/null
+++ b/src/components/UnderHeader/APIError.css
@@ -0,0 +1,32 @@
+.apiErrorMessage_mainDiv {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ margin: 2rem 0rem;
+ padding: 0 3rem;
+ width: 100%;
+}
+
+.apiErrorMessage__div {
+ display: flex;
+ align-items: left;
+ flex-direction: column;
+ border-radius: 0.28rem;
+ padding: 0.5rem 1rem;
+ max-width: 1000px;
+ background-color: #fff6f6;
+}
+
+.apiErrorMessage__header {
+ color: #912d2b;
+ font-family: var(--font-family);
+ font-size: 1.2rem;
+ font-weight: 800;
+}
+
+.apiErrorMessage__div p {
+ color: #912d2b;
+ font-family: var(--font-family);
+ font-size: 0.97rem;
+ font-weight: 500;
+}
diff --git a/src/components/UnderHeader/APIError.tsx b/src/components/UnderHeader/APIError.tsx
new file mode 100644
index 0000000..d1df752
--- /dev/null
+++ b/src/components/UnderHeader/APIError.tsx
@@ -0,0 +1,24 @@
+import React from "react";
+import { Message } from "semantic-ui-react";
+import "./APIError.css";
+
+interface APIErrorProps {
+ apiResponse: string;
+}
+
+class APIError extends React.Component
{
+ render() {
+ return (
+
+ {this.props.apiResponse !== "" && (
+
+ API Error
+ {this.props.apiResponse}
+
+ )}
+
+ );
+ }
+}
+
+export default APIError;
diff --git a/src/components/UnderHeader/Feature.css b/src/components/UnderHeader/Feature.css
index 9178260..2de12cd 100644
--- a/src/components/UnderHeader/Feature.css
+++ b/src/components/UnderHeader/Feature.css
@@ -1,57 +1,56 @@
.curio_feature {
- width: 100%;
- display: flex;
- justify-content: space-between;
- align-items: flex-start;
- flex-direction: column;
+ width: 100%;
+ display: flex;
+ justify-content: space-between;
+ align-items: flex-start;
+ flex-direction: column;
- margin: 1rem;
+ margin: 1rem;
}
.curio_feature-title {
- flex: 1;
- max-width: 180px;
- margin-right: 2rem;
+ flex: 1;
+ max-width: 180px;
+ margin-right: 2rem;
}
.curio_feature-title h1 {
- font-family: var(--font-family);
- font-weight: 800;
- font-size: 1.2rem;
- line-height: 24px;
- letter-spacing: -0.04em;
- color: #fff;
+ font-family: var(--font-family);
+ font-weight: 800;
+ font-size: 1.2rem;
+ line-height: 24px;
+ letter-spacing: -0.04em;
+ color: #fff;
}
.curio_feature-title div {
- width: 38px;
- height: 3px;
- background: var(--gradient-bar);
- box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
- margin-bottom: 0.25rem;
+ width: 38px;
+ height: 3px;
+ background: var(--gradient-bar);
+ box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
+ margin-bottom: 0.25rem;
}
.curiofeature-text {
- flex: 2;
- max-width: 390px;
- display: flex;
+ flex: 2;
+ max-width: 390px;
+ display: flex;
}
.curiofeature-text p {
- font-family: var(--font-family);
- font-weight: 500;
- font-size: .97rem;
- line-height: 24px;
- color: var(--color-text);
+ font-family: var(--font-family);
+ font-weight: 500;
+ font-size: 0.97rem;
+ line-height: 24px;
+ color: var(--color-text);
}
@media only screen and (min-width: 768px) {
- /* For mobile phones: */
- [class="curio_feature"] {
- flex-direction: row;
- }
- [class="curio_feature-title h1"]{
-
- font-size: 18px;
- }
+ /* For mobile phones: */
+ [class="curio_feature"] {
+ flex-direction: row;
}
+ [class="curio_feature-title h1"] {
+ font-size: 18px;
+ }
+}
diff --git a/src/components/UnderHeader/Feature.tsx b/src/components/UnderHeader/Feature.tsx
index 165194a..f9145f3 100644
--- a/src/components/UnderHeader/Feature.tsx
+++ b/src/components/UnderHeader/Feature.tsx
@@ -1,5 +1,5 @@
-import React from 'react';
-import './Feature.css';
+import React from "react";
+import "./Feature.css";
interface FeatureProps {
title: string;
diff --git a/src/components/UnderHeader/SearchBar.css b/src/components/UnderHeader/SearchBar.css
index c87a3b6..1ba7a21 100644
--- a/src/components/UnderHeader/SearchBar.css
+++ b/src/components/UnderHeader/SearchBar.css
@@ -1,54 +1,53 @@
-.curio__search{
- padding: 0 3rem;
+.curio__search {
+ padding: 0 3rem;
}
-.curio__search Input{
- display: flex;
- flex: 2;
- width: 100%;
- min-height: 50px;
- font-family: var(--font-family);
- background: var(--color-footer);
- border: 2px solid var(--color-footer);
- padding: 0 1rem;
- outline: none;
- color: #fff;
- border-radius: 5px 0px 0px 5px;
- font-style: normal;
- font-weight: normal;
- font-size: 1.1rem;
- line-height: 27px;
- color: #3D6184;
+.curio__search Input {
+ display: flex;
+ flex: 2;
+ width: 100%;
+ min-height: 50px;
+ font-family: var(--font-family);
+ background: var(--color-footer);
+ border: 2px solid var(--color-footer);
+ padding: 0 1rem;
+ outline: none;
+ color: #fff;
+ border-radius: 5px 0px 0px 5px;
+ font-style: normal;
+ font-weight: normal;
+ font-size: 1.1rem;
+ line-height: 27px;
+ color: #3d6184;
}
-.curio__search button{
- flex: 0.6;
- width: 100%;
- min-height: 50px;
- font-family: var(--font-family);
- font-weight: 400;
- font-size: 20px;
- line-height: 28px;
- background: #FF4820;
- border: 2px solid #FF4820;
- padding: 0 1rem;
- color: #fff;
- cursor: pointer;
- outline: none;
+.curio__search button {
+ flex: 0.6;
+ width: 100%;
+ min-height: 50px;
+ font-family: var(--font-family);
+ font-weight: 400;
+ font-size: 20px;
+ line-height: 28px;
+ background: #ff4820;
+ border: 2px solid #ff4820;
+ padding: 0 1rem;
+ color: #fff;
+ cursor: pointer;
+ outline: none;
- border-top-right-radius: 5px;
- border-bottom-right-radius: 5px;
+ border-top-right-radius: 5px;
+ border-bottom-right-radius: 5px;
}
.curio__search__input {
- width: 100%;
- margin: 2rem 0 1rem;
-
- display: flex;
- flex-direction: row;
+ width: 100%;
+ margin: 2rem 0 1rem;
+
+ display: flex;
+ flex-direction: row;
}
@media only screen and (min-width: 768px) {
-.curio__search Input{
+ .curio__search Input {
font-size: 1.4rem;
-}
-
+ }
}
diff --git a/src/components/UnderHeader/Searchbar.tsx b/src/components/UnderHeader/Searchbar.tsx
index 723f960..2b16c98 100644
--- a/src/components/UnderHeader/Searchbar.tsx
+++ b/src/components/UnderHeader/Searchbar.tsx
@@ -1,7 +1,7 @@
-import React, { FormEvent } from 'react';
-import { Input, Button } from 'rsuite';
-import SearchIcon from '@rsuite/icons/Search';
-import './SearchBar.css';
+import React, { FormEvent } from "react";
+import { Input, Button } from "rsuite";
+import SearchIcon from "@rsuite/icons/Search";
+import "./SearchBar.css";
interface SearchbarProps {
handleFormSubmit: (termFromSearchBar: string) => void;
@@ -15,7 +15,7 @@ class Searchbar extends React.Component {
constructor(props: SearchbarProps) {
super(props);
this.state = {
- term: '',
+ term: "",
};
}
diff --git a/src/components/UnderHeader/UnderHeader.css b/src/components/UnderHeader/UnderHeader.css
index ac32c10..ae0afae 100644
--- a/src/components/UnderHeader/UnderHeader.css
+++ b/src/components/UnderHeader/UnderHeader.css
@@ -1,92 +1,117 @@
.curio_whatcurio {
- display: flex;
- flex-direction: column;
- border-radius: 20px;
- padding: 2rem;
- background: var(--color-footer);
-
- /* ff 3.6+ */
- background:-moz-radial-gradient(circle at 30% -100%, #042c54 25%, rgba(4, 44, 84, 1) 85%, rgba(27, 120, 222, 1) 100%);
-
- /* safari 5.1+,chrome 10+ */
- background:-webkit-radial-gradient(circle at 30% -100%, #042c54 25%, rgba(4, 44, 84, 1) 85%, rgba(27, 120, 222, 1) 100%);
-
- /* opera 11.10+ */
- background:-o-radial-gradient(circle at 30% -100%, #042c54 25%, rgba(4, 44, 84, 1) 85%, rgba(27, 120, 222, 1) 100%);
-
- /* ie 10+ */
- background:-ms-radial-gradient(circle at 30% -100%, #042c54 25%, rgba(4, 44, 84, 1) 85%, rgba(27, 120, 222, 1) 100%);
-
- /* global 92%+ browsers support */
- background:radial-gradient(circle at 30% -100%, #042c54 25%, rgba(4, 44, 84, 1) 85%, rgba(27, 120, 222, 1) 100%);
-
- filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25));
+ display: flex;
+ flex-direction: column;
+ border-radius: 20px;
+ padding: 2rem;
+ background: var(--color-footer);
+
+ /* ff 3.6+ */
+ background: -moz-radial-gradient(
+ circle at 30% -100%,
+ #042c54 25%,
+ rgba(4, 44, 84, 1) 85%,
+ rgba(27, 120, 222, 1) 100%
+ );
+
+ /* safari 5.1+,chrome 10+ */
+ background: -webkit-radial-gradient(
+ circle at 30% -100%,
+ #042c54 25%,
+ rgba(4, 44, 84, 1) 85%,
+ rgba(27, 120, 222, 1) 100%
+ );
+
+ /* opera 11.10+ */
+ background: -o-radial-gradient(
+ circle at 30% -100%,
+ #042c54 25%,
+ rgba(4, 44, 84, 1) 85%,
+ rgba(27, 120, 222, 1) 100%
+ );
+
+ /* ie 10+ */
+ background: -ms-radial-gradient(
+ circle at 30% -100%,
+ #042c54 25%,
+ rgba(4, 44, 84, 1) 85%,
+ rgba(27, 120, 222, 1) 100%
+ );
+
+ /* global 92%+ browsers support */
+ background: radial-gradient(
+ circle at 30% -100%,
+ #042c54 25%,
+ rgba(4, 44, 84, 1) 85%,
+ rgba(27, 120, 222, 1) 100%
+ );
+
+ filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25));
}
.curio_whatcurio-feature {
- display: flex;
+ display: flex;
}
/* Customizing feature component as per needs */
.curio_whatcurio-feature .gpt3__features-container__feature {
- margin: 0;
+ margin: 0;
}
/* Customizing feature component as per needs */
.curio_whatcurio-feature .gpt3__features-container_feature-text {
- max-width: 700px;
+ max-width: 700px;
}
.curio_whatcurio-heading {
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- align-items: center;
-
- margin: 4rem 0 2rem;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+ align-items: center;
+
+ margin: 4rem 0 2rem;
}
.curio_whatcurio-heading h1 {
- font-size: 2.2rem;
- line-height: 45px;
- font-weight: 800;
- font-family: var(--font-family);
- max-width: 510px;
+ font-size: 2.2rem;
+ line-height: 45px;
+ font-weight: 800;
+ font-family: var(--font-family);
+ max-width: 510px;
}
.curio_whatcurio-heading p {
- font-family: var(--font-family);
- font-weight: 500;
- font-size: 1.2rem;
- line-height: 30px;
- color: var(--color-subtext);
- cursor: pointer;
+ font-family: var(--font-family);
+ font-weight: 500;
+ font-size: 1.2rem;
+ line-height: 30px;
+ color: var(--color-subtext);
+ cursor: pointer;
}
.curio_whatcurio-container {
- display: flex;
- flex-wrap: wrap;
- flex-direction: row;
+ display: flex;
+ flex-wrap: wrap;
+ flex-direction: row;
- margin-top: 2rem;
+ margin-top: 2rem;
}
/* Customizing feature component as per needs */
.curio_whatcurio-container .gpt3__features-container__feature {
- flex: 1;
- margin: 1rem;
- min-width: 210px;
- display: unset;
- flex-direction: column;
+ flex: 1;
+ margin: 1rem;
+ min-width: 210px;
+ display: unset;
+ flex-direction: column;
}
/* Customizing feature component as per needs */
.curio_whatcurio-container .gpt3__features-container_feature-text {
- margin-top: 0.5rem;
+ margin-top: 0.5rem;
}
@media only screen and (min-width: 768px) {
- [class="curio_whatcurio-heading"] {
- flex-direction: row;
- }
+ [class="curio_whatcurio-heading"] {
+ flex-direction: row;
+ }
}
diff --git a/src/components/UnderHeader/UnderHeader.tsx b/src/components/UnderHeader/UnderHeader.tsx
index 3e4682c..efc8edc 100644
--- a/src/components/UnderHeader/UnderHeader.tsx
+++ b/src/components/UnderHeader/UnderHeader.tsx
@@ -1,24 +1,38 @@
-import React from 'react'
-import './UnderHeader.css'
-import Feature from './Feature';
+import React from "react";
+import "./UnderHeader.css";
+import Feature from "./Feature";
function UnderHeader() {
return (
-
-
+
+
+
+
+
+ The possibilities are beyond your imagination
+
+
Explore the Tool
+
+
+
+
+
+
-
-
The possibilities are beyond your imagination
-
Explore the Tool
-
-
-
-
-
-
-
- )
+ );
}
-export default UnderHeader;
\ No newline at end of file
+export default UnderHeader;
diff --git a/src/components/Video/Player.tsx b/src/components/Video/Player.tsx
index d696113..763dad7 100644
--- a/src/components/Video/Player.tsx
+++ b/src/components/Video/Player.tsx
@@ -1,15 +1,15 @@
-import React from 'react';
-import YouTube from 'react-youtube';
-import { useParams } from 'react-router-dom';
-import TranslatedAudio from './translatedAudio';
-import './video.css';
+import React from "react";
+import YouTube from "react-youtube";
+import { useParams } from "react-router-dom";
+import TranslatedAudio from "./translatedAudio";
+import "./video.css";
const Player = (props: any) => {
const { vidId } = useParams<{ vidId: string }>();
const opts = {
- height: '390',
- width: '640',
+ height: "390",
+ width: "640",
playerVars: {
autoplay: 1,
},
@@ -21,7 +21,9 @@ const Player = (props: any) => {
const stateChange = (e: any) => {
let yt = e.target as any;
- let mAudio = document.getElementById('translatedAudio') as HTMLAudioElement | null;
+ let mAudio = document.getElementById(
+ "translatedAudio",
+ ) as HTMLAudioElement | null;
if (mAudio && yt.getCurrentTime) {
mAudio.currentTime = yt.getCurrentTime() as number;
@@ -30,7 +32,9 @@ const Player = (props: any) => {
const playvid = (e: any) => {
let yt = e.target as any;
- let mAudio = document.getElementById('translatedAudio') as HTMLAudioElement | null;
+ let mAudio = document.getElementById(
+ "translatedAudio",
+ ) as HTMLAudioElement | null;
if (mAudio && yt.getCurrentTime) {
mAudio.load();
@@ -40,7 +44,9 @@ const Player = (props: any) => {
};
const stopvid = () => {
- let mAudio = document.getElementById('translatedAudio') as HTMLAudioElement | null;
+ let mAudio = document.getElementById(
+ "translatedAudio",
+ ) as HTMLAudioElement | null;
if (mAudio) {
mAudio.pause();
@@ -49,7 +55,9 @@ const Player = (props: any) => {
const playbackchange = (e: any) => {
let yt = e.target as any;
- let mAudio = document.getElementById('translatedAudio') as HTMLAudioElement | null;
+ let mAudio = document.getElementById(
+ "translatedAudio",
+ ) as HTMLAudioElement | null;
if (mAudio && yt.getPlaybackRate) {
mAudio.playbackRate = yt.getPlaybackRate() as number;
diff --git a/src/components/Video/VideoItem.tsx b/src/components/Video/VideoItem.tsx
index 5ac6d72..0946210 100644
--- a/src/components/Video/VideoItem.tsx
+++ b/src/components/Video/VideoItem.tsx
@@ -1,6 +1,6 @@
-import React from 'react';
-import { Button } from 'rsuite';
-import './video.css';
+import React from "react";
+import { Button } from "rsuite";
+import "./video.css";
interface VideoItemProps {
video: {
@@ -24,19 +24,22 @@ interface VideoItemProps {
const VideoItem: React.FC = ({ video, setVidId, setRecId }) => {
return (
-
-
+
+
-
+
{video.snippet.title}
-
+
{video.snippet.channelTitle}
-
+
setVidId(video.id.videoId)}>Watch
-
+
setRecId(video.id.videoId)}>Translate
diff --git a/src/components/Video/VideoList.tsx b/src/components/Video/VideoList.tsx
index ad1b1de..1bfb1be 100644
--- a/src/components/Video/VideoList.tsx
+++ b/src/components/Video/VideoList.tsx
@@ -1,5 +1,5 @@
-import React from 'react';
-import VideoItem from './VideoItem';
+import React from "react";
+import VideoItem from "./VideoItem";
interface VideoListProps {
videos: Array
;
@@ -7,7 +7,11 @@ interface VideoListProps {
setRecId: (videoId: string) => void;
}
-const VideoList: React.FC = ({ videos, setVidId, setRecId }) => {
+const VideoList: React.FC = ({
+ videos,
+ setVidId,
+ setRecId,
+}) => {
const renderedVideos = videos.map((video, index) => {
return (
diff --git a/src/components/Video/translatedAudio.tsx b/src/components/Video/translatedAudio.tsx
index 2ac82eb..a6f3201 100644
--- a/src/components/Video/translatedAudio.tsx
+++ b/src/components/Video/translatedAudio.tsx
@@ -1,11 +1,11 @@
-import React, { useState } from 'react';
-import axios from 'axios';
-import { Button } from 'rsuite';
-import { useParams } from 'react-router-dom';
+import React, { useState } from "react";
+import axios from "axios";
+import { Button } from "rsuite";
+import { useParams } from "react-router-dom";
const TranslatedAudio = () => {
const [audio, setAudio] = useState
(undefined);
- const { vidId } = useParams<{ vidId: string }>();
+ const { vidId } = useParams<{ vidId: string }>();
const GETKEY = process.env.REACT_APP_DOWN;
@@ -13,24 +13,24 @@ const TranslatedAudio = () => {
const API_ENDPOINT = `${GETKEY}${vidId}`;
try {
const response = await axios({
- method: 'GET',
+ method: "GET",
url: API_ENDPOINT,
- responseType: 'blob'
- })
- console.log('Response: ', response);
+ responseType: "blob",
+ });
+ console.log("Response: ", response);
const blobUrl = URL.createObjectURL(response.data);
setAudio(blobUrl);
} catch (error) {
- console.error('Error: ', error);
+ console.error("Error: ", error);
}
};
return (
<>
Get Translated Audio
- {audio && }
+ {audio && }
>
);
};
diff --git a/src/components/Video/video.css b/src/components/Video/video.css
index f240e6a..7ac800b 100644
--- a/src/components/Video/video.css
+++ b/src/components/Video/video.css
@@ -1,91 +1,89 @@
.video_item {
- display: flex !important;
- align-items: center !important;
- cursor: pointer;
- margin-left: 33px;
+ display: flex !important;
+ align-items: center !important;
+ cursor: pointer;
+ margin-left: 33px;
}
.video_item img {
- max-width: 600px;
- max-height: 450px ;
- padding: 1%;
- border-radius: 1.5rem;
+ max-width: 600px;
+ max-height: 450px;
+ padding: 1%;
+ border-radius: 1.5rem;
}
-.title{
- color: #fff;
- margin-left: 16px;
+.title {
+ color: #fff;
+ margin-left: 16px;
}
-.channel_name{
- color: darkgray;
- margin: 16px;
+.channel_name {
+ color: darkgray;
+ margin: 16px;
}
.watch Button {
- margin: 1rem;
- /* flex: 0.6; */
- /* width: 100%; */
- min-height: 50px;
- font-family: var(--font-family);
- font-weight: 400;
- font-size: 20px;
- line-height: 28px;
- background: #FF4820;
- border: 2px solid #FF4820;
- padding: 0 1rem;
- color: #fff;
- cursor: pointer;
- outline: none;
+ margin: 1rem;
+ /* flex: 0.6; */
+ /* width: 100%; */
+ min-height: 50px;
+ font-family: var(--font-family);
+ font-weight: 400;
+ font-size: 20px;
+ line-height: 28px;
+ background: #ff4820;
+ border: 2px solid #ff4820;
+ padding: 0 1rem;
+ color: #fff;
+ cursor: pointer;
+ outline: none;
- border-top-right-radius: 5px;
- border-bottom-right-radius: 5px;
+ border-top-right-radius: 5px;
+ border-bottom-right-radius: 5px;
}
.translate Button {
- margin: 1rem;
- /* flex: 0.6; */
- /* width: 100%; */
- min-height: 50px;
- font-family: var(--font-family);
- font-weight: 400;
- font-size: 20px;
- line-height: 28px;
- background: #31b425;
- border: 2px solid #31b425;
- padding: 0 1rem;
- color: #fff;
- cursor: pointer;
- outline: none;
+ margin: 1rem;
+ /* flex: 0.6; */
+ /* width: 100%; */
+ min-height: 50px;
+ font-family: var(--font-family);
+ font-weight: 400;
+ font-size: 20px;
+ line-height: 28px;
+ background: #31b425;
+ border: 2px solid #31b425;
+ padding: 0 1rem;
+ color: #fff;
+ cursor: pointer;
+ outline: none;
- border-top-right-radius: 5px;
- border-bottom-right-radius: 5px;
+ border-top-right-radius: 5px;
+ border-bottom-right-radius: 5px;
}
.youtube {
- display:flex;
- margin-left: 30px;
- justify-content: space-around;
- align-items: center;
+ display: flex;
+ margin-left: 30px;
+ justify-content: space-around;
+ align-items: center;
}
.youtube Button {
+ margin: 1rem;
+ /* flex: 0.6; */
+ /* width: 100%; */
+ min-height: 50px;
+ font-family: var(--font-family);
+ font-weight: 400;
+ font-size: 20px;
+ line-height: 28px;
+ background: #31b425;
+ border: 2px solid #31b425;
+ padding: 0 1rem;
+ color: #fff;
+ cursor: pointer;
+ outline: none;
- margin: 1rem;
- /* flex: 0.6; */
- /* width: 100%; */
- min-height: 50px;
- font-family: var(--font-family);
- font-weight: 400;
- font-size: 20px;
- line-height: 28px;
- background: #31b425;
- border: 2px solid #31b425;
- padding: 0 1rem;
- color: #fff;
- cursor: pointer;
- outline: none;
-
- border-top-right-radius: 5px;
- border-bottom-right-radius: 5px;
+ border-top-right-radius: 5px;
+ border-bottom-right-radius: 5px;
}
-
diff --git a/src/components/assets/images/curio.png.d.ts b/src/components/assets/images/curio.png.d.ts
index 099473d..6a81ab5 100644
--- a/src/components/assets/images/curio.png.d.ts
+++ b/src/components/assets/images/curio.png.d.ts
@@ -1,4 +1,4 @@
-declare module '*.png' {
- const value: any;
- export default value;
+declare module "*.png" {
+ const value: any;
+ export default value;
}
diff --git a/src/components/comments/AddComment.scss b/src/components/comments/AddComment.scss
index 5f12986..bb6e522 100644
--- a/src/components/comments/AddComment.scss
+++ b/src/components/comments/AddComment.scss
@@ -1,4 +1,4 @@
-@import './shared.scss';
+@import "./shared.scss";
.add-comment {
display: flex;
diff --git a/src/components/comments/AddComment.tsx b/src/components/comments/AddComment.tsx
index 85e19f2..666ec8a 100644
--- a/src/components/comments/AddComment.tsx
+++ b/src/components/comments/AddComment.tsx
@@ -1,14 +1,22 @@
-import React from 'react';
-import './AddComment.scss';
-import {Form, Image, TextArea} from "semantic-ui-react";
+import React from "react";
+import "./AddComment.scss";
+import { Form, Image, TextArea } from "semantic-ui-react";
export function AddComment() {
return (
-
-
+
+
+
);
-}
\ No newline at end of file
+}
diff --git a/src/components/comments/Comment.scss b/src/components/comments/Comment.scss
index 4e7daf5..85bf504 100644
--- a/src/components/comments/Comment.scss
+++ b/src/components/comments/Comment.scss
@@ -1,23 +1,23 @@
-@import './shared.scss';
+@import "./shared.scss";
.comment {
- display: flex;
- margin: 8px 0;
+ display: flex;
+ margin: 8px 0;
- .user-image {
- width: $avatar-diameter;
- height: $avatar-diameter;
- margin-right: $avatar-margin;
- flex-shrink: 0;
- }
+ .user-image {
+ width: $avatar-diameter;
+ height: $avatar-diameter;
+ margin-right: $avatar-margin;
+ flex-shrink: 0;
+ }
- .user-name {
- font-weight: 600;
- margin-bottom: 4px;
- }
- .comment-actions {
- margin-top: 4px;
- button {
- margin-left: 8px;
- }
+ .user-name {
+ font-weight: 600;
+ margin-bottom: 4px;
+ }
+ .comment-actions {
+ margin-top: 4px;
+ button {
+ margin-left: 8px;
}
-}
\ No newline at end of file
+ }
+}
diff --git a/src/components/comments/Comment.tsx b/src/components/comments/Comment.tsx
index c4fbb65..c05663b 100644
--- a/src/components/comments/Comment.tsx
+++ b/src/components/comments/Comment.tsx
@@ -1,6 +1,6 @@
-import React from 'react';
-import './Comment.scss';
-import { Image } from 'semantic-ui-react';
+import React from "react";
+import "./Comment.scss";
+import { Image } from "semantic-ui-react";
interface CommentProps {
userName: string;
@@ -9,14 +9,16 @@ interface CommentProps {
export function Comment(props: CommentProps) {
return (
-
-
+
+
-
{props.userName}
+
{props.userName}
{props.commentText}
-
- {/* Add your components here */}
-
+
{/* Add your components here */}
);
diff --git a/src/components/comments/Comments.tsx b/src/components/comments/Comments.tsx
index e1f8180..6ba62af 100644
--- a/src/components/comments/Comments.tsx
+++ b/src/components/comments/Comments.tsx
@@ -1,7 +1,7 @@
-import React from 'react';
-import { CommentsHeader } from './CommentsHeader';
-import { AddComment } from './AddComment';
-import { Comment } from './Comment';
+import React from "react";
+import { CommentsHeader } from "./CommentsHeader";
+import { AddComment } from "./AddComment";
+import { Comment } from "./Comment";
// Define a type for your comment objects
interface CommentObject {
@@ -17,7 +17,11 @@ interface CommentsProps {
export class Comments extends React.Component
{
render() {
const commentComponents = this.props.comments.map((comment, index) => (
-
+
));
return (
diff --git a/src/components/comments/CommentsHeader.scss b/src/components/comments/CommentsHeader.scss
index 08ed8c3..7a5b192 100644
--- a/src/components/comments/CommentsHeader.scss
+++ b/src/components/comments/CommentsHeader.scss
@@ -1,6 +1,6 @@
.comments-header {
- h4 {
- display: inline-block;
- margin-right: 16px;
- }
-}
\ No newline at end of file
+ h4 {
+ display: inline-block;
+ margin-right: 16px;
+ }
+}
diff --git a/src/components/comments/CommentsHeader.tsx b/src/components/comments/CommentsHeader.tsx
index c7e7774..cd7caa9 100644
--- a/src/components/comments/CommentsHeader.tsx
+++ b/src/components/comments/CommentsHeader.tsx
@@ -1,6 +1,6 @@
-import React from 'react';
-import { Button, Icon } from 'semantic-ui-react';
-import './CommentsHeader.scss';
+import React from "react";
+import { Button, Icon } from "semantic-ui-react";
+import "./CommentsHeader.scss";
interface CommentsHeaderProps {
amountComments: number;
@@ -8,10 +8,10 @@ interface CommentsHeaderProps {
export function CommentsHeader(props: CommentsHeaderProps) {
return (
-
+
{props.amountComments} Comments
-
-
+
+
Sort by
diff --git a/src/components/comments/shared.scss b/src/components/comments/shared.scss
index 2aebd47..4a91f96 100644
--- a/src/components/comments/shared.scss
+++ b/src/components/comments/shared.scss
@@ -1,4 +1,3 @@
-
/* old content unchanged*/
$avatar-diameter: 48px;
-$avatar-margin: 10px;
\ No newline at end of file
+$avatar-margin: 10px;
diff --git a/src/index.js b/src/index.js
index 9ba39d6..13b1b8e 100644
--- a/src/index.js
+++ b/src/index.js
@@ -1,10 +1,10 @@
-import React from 'react';
-import ReactDOM from 'react-dom/client';
-import App from './App';
-import './style/styles.css';
-const root = ReactDOM.createRoot(document.getElementById('root'));
+import React from "react";
+import ReactDOM from "react-dom/client";
+import App from "./App";
+import "./style/styles.css";
+const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(
-
+ ,
);
diff --git a/src/style/styles.css b/src/style/styles.css
index b00e768..d290791 100644
--- a/src/style/styles.css
+++ b/src/style/styles.css
@@ -1,18 +1,20 @@
@import "rsuite/dist/rsuite.css";
-#root{ padding: 10px; }
+#root {
+ padding: 10px;
+}
-@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@200;300;400;500;600;700;800&display=swap');
+@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@200;300;400;500;600;700;800&display=swap");
:root {
- --font-family: 'Manrope', sans-serif;
+ --font-family: "Manrope", sans-serif;
- --gradient-text: linear-gradient(89.97deg, #AE67FA 1.84%, #F49867 102.67%);
- --gradient-bar: linear-gradient(103.22deg, #AE67FA -13.86%, #F49867 99.55%);
-
- --color-bg: #040C18;
- --color-footer : #031B34;
+ --gradient-text: linear-gradient(89.97deg, #ae67fa 1.84%, #f49867 102.67%);
+ --gradient-bar: linear-gradient(103.22deg, #ae67fa -13.86%, #f49867 99.55%);
+
+ --color-bg: #040c18;
+ --color-footer: #031b34;
--color-blog: #042c54;
- --color-text: #81AFDD;
- --color-subtext: #FF8A71;
-}
\ No newline at end of file
+ --color-text: #81afdd;
+ --color-subtext: #ff8a71;
+}
diff --git a/tailwind.config.js b/tailwind.config.js
index 5a66654..37cc651 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -1,10 +1,8 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
- content: [
- "./src/**/*.{js,jsx,ts,tsx}",
- ],
+ content: ["./src/**/*.{js,jsx,ts,tsx}"],
theme: {
extend: {},
},
plugins: [],
-}
\ No newline at end of file
+};