Skip to content

Commit

Permalink
init commit
Browse files Browse the repository at this point in the history
  • Loading branch information
sutigit committed Jan 28, 2025
1 parent 7296b04 commit 5ab4708
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { TextField, Button, Box } from '@mui/material'
import { useTranslation } from 'react-i18next'
import { useState } from 'react'

const TextFieldComponent = () => {
const MeasuresTextField = () => {
const { t } = useTranslation()

const [content, setContent] = useState<string>('')
Expand Down Expand Up @@ -49,4 +49,4 @@ const TextFieldComponent = () => {
)
}

export default TextFieldComponent
export default MeasuresTextField
39 changes: 35 additions & 4 deletions client/components/V1/index.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,47 @@
import { useSelector, useDispatch } from 'react-redux'
import DataComponent from './DataComponent'

import TextFieldComponent from './Generic/TextFieldComponent'
import MeasuresTextField from './Generic/MeasuresTextField'
import { useEffect } from 'react'
import { getStudyProgrammes } from '../../util/redux/studyProgrammesReducer'




const Page = () => {
// testaillen toimenpide tekstikenttää
/*
MVP
1. Tuo koulutusohjelma toimenpiteet teksti sisään
2. Näytä teksti
3. Muokkaa tekstiä
4. Sulje muokkaus muilta
5. Tallenna teksti
6. vapauta muokkaus muille
*/
const dispatch = useDispatch()

// tänne studyprogramme

const studyprogramme = useSelector(({ studyProgrammes }) => studyProgrammes.data)

useEffect(() => {
dispatch(getStudyProgrammes())
}, [])

return (
<div>
<h1>Page</h1>
<br />
<pre>
{JSON.stringify(studyprogramme, null, 2)}
</pre>

{/* testaillen toimenpide tekstikenttää */}
<div>
<h1>Testattava teksikenttä</h1>
<TextFieldComponent />
<h1>TESTI TOIMENPITEET</h1>
<MeasuresTextField />

</div>

<br />
Expand Down

0 comments on commit 5ab4708

Please sign in to comment.