forked from oss-slu/lrda_website
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpage.tsx
More file actions
50 lines (46 loc) · 1.15 KB
/
page.tsx
File metadata and controls
50 lines (46 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// use client
import Image from "next/image";
import React, { useState } from 'react';
import { Note } from './types';
export default function Home() {
// Initialize note state with the Note type
const [note, setNote] = useState<Note>({
id: '',
title: '',
text: '',
time: new Date(),
media: [],
audio: [],
creator: '',
latitude: '',
longitude: '',
published: undefined,
tags: []
});
const handleNotesChange = (e: React.ChangeEvent<HTMLTextAreaElement>) => {
// Update the text field of the note object
setNote({
...note,
text: e.target.value,
});
};
return (
<main className="flex min-h-screen flex-col items-center justify-between p-24">
<div className="">
<h1 className="text-blue-500 text-2xl">Where's Religion?</h1>
</div>
<div className="note-taking-section">
<h2>Your Notes:</h2>
<textarea
value={note.text}
onChange={handleNotesChange}
rows={10}
cols={50}
placeholder="Write your notes here..."
className="border p-2"
>
</textarea>
</div>
</main>
);
}