Change 'kont' page to 'soumet' page & change EkriTeks title
This commit is contained in:
@@ -9,7 +9,7 @@ import Tab from '@material-ui/core/Tab'
|
||||
import HomeIcon from '@material-ui/icons/Home'
|
||||
import MenuBookIcon from '@material-ui/icons/MenuBook'
|
||||
import RecordVoiceOverIcon from '@material-ui/icons/RecordVoiceOver'
|
||||
import AccountCircleIcon from '@material-ui/icons/AccountCircle'
|
||||
import PlaylistAddIcon from '@material-ui/icons/PlaylistAdd'
|
||||
import Typography from '@material-ui/core/Typography'
|
||||
import Box from '@material-ui/core/Box'
|
||||
|
||||
@@ -17,14 +17,14 @@ const tabRouteHref = [
|
||||
'/',
|
||||
'/awtis?paj&paj=1',
|
||||
'/teks',
|
||||
'/kont'
|
||||
'/soumet'
|
||||
]
|
||||
|
||||
const tabRouteAs = [
|
||||
'/',
|
||||
'/awtis/paj/1',
|
||||
'/teks',
|
||||
'/kont'
|
||||
'/soumet'
|
||||
]
|
||||
|
||||
function TabPanel(props) {
|
||||
@@ -97,7 +97,7 @@ export default function Navigasyon({selectedTab}) {
|
||||
<Tab label='Kay-la' icon={<HomeIcon style={{fontSize: 30}} />} {...a11yProps(0)} />
|
||||
<Tab label='Awtis' icon={<RecordVoiceOverIcon style={{fontSize: 30}} />} {...a11yProps(1)} />
|
||||
<Tab label='Tèks' icon={<MenuBookIcon style={{fontSize: 30}} />} {...a11yProps(2)} />
|
||||
<Tab label='Kont' icon={<AccountCircleIcon style={{fontSize: 30}} />} {...a11yProps(3)} />
|
||||
<Tab label='Soumèt' icon={<PlaylistAddIcon style={{fontSize: 30}} />} {...a11yProps(3)} />
|
||||
</Tabs>
|
||||
</AppBar>
|
||||
<TabPanel value={value} index={0} />
|
||||
|
||||
@@ -2,6 +2,7 @@ import {useEffect, useState} from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import axios from 'axios'
|
||||
import {
|
||||
Box,
|
||||
Button,
|
||||
Container,
|
||||
Grid,
|
||||
@@ -109,9 +110,14 @@ function EkriTeks({session}) {
|
||||
|
||||
return (
|
||||
<Container maxWidth='sm'>
|
||||
<Typography gutterBottom align='center' variant='h4' component='h1'>
|
||||
Soumettre un texte
|
||||
<Box align='center' marginBottom={2}>
|
||||
<Typography display='inline' variant='h5' component='h1'>
|
||||
Soumèt an tèks
|
||||
</Typography>
|
||||
<Typography>
|
||||
<small>(soumettre un texte)</small>
|
||||
</Typography>
|
||||
</Box>
|
||||
<form noValidate autoComplete='off'>
|
||||
<Grid container style={{textAlign: 'center'}} spacing={1}>
|
||||
<Grid item xs>
|
||||
@@ -170,7 +176,7 @@ function EkriTeks({session}) {
|
||||
<Button
|
||||
fullWidth
|
||||
disabled={loading || teksEkri.awtis === '' || teksEkri.tit === '' || teksEkri.transkripsyon === ''}
|
||||
style={{marginTop: 20}}
|
||||
style={{marginBlock: 20}}
|
||||
variant='contained'
|
||||
color='primary'
|
||||
onClick={handleClick}
|
||||
@@ -179,7 +185,7 @@ function EkriTeks({session}) {
|
||||
Soumèt
|
||||
</Typography>
|
||||
</Button>
|
||||
{loading && <LinearProgress size={24} style={{width: '100%', marginTop: '1em'}} />}
|
||||
{loading && <LinearProgress size={24} style={{width: '100%', marginBlock: '1em'}} />}
|
||||
</div>
|
||||
{success && (
|
||||
<Snackbar open={open} autoHideDuration={10000} onClose={handleClose}>
|
||||
@@ -45,7 +45,7 @@ function Koneksyon() {
|
||||
setLoading(false)
|
||||
} else if (response.ok) {
|
||||
setLoading(false)
|
||||
router.push('/kont')
|
||||
router.push('/soumet')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,6 +62,10 @@ function Koneksyon() {
|
||||
if (loginError) {
|
||||
setOpen(true)
|
||||
}
|
||||
|
||||
return () => {
|
||||
setLoading(false)
|
||||
}
|
||||
}, [loginError])
|
||||
|
||||
const handleClickShowPassword = () => {
|
||||
@@ -48,8 +48,8 @@ const options = {
|
||||
}
|
||||
},
|
||||
pages: {
|
||||
signIn: '/kont',
|
||||
error: '/kont'
|
||||
signIn: '/soumet',
|
||||
error: '/soumet'
|
||||
}
|
||||
}
|
||||
const Auth = (request, response) =>
|
||||
|
||||
@@ -2,9 +2,9 @@ import {useState, useEffect} from 'react'
|
||||
import {useSession} from 'next-auth/client'
|
||||
|
||||
import HeadLayout from '../components/head-layout'
|
||||
import Koneksyon from '../components/kont/koneksyon'
|
||||
import Dekoneksyon from '../components/kont/dekoneksyon'
|
||||
import EkriTeks from '../components/kont/ekri-teks'
|
||||
import Koneksyon from '../components/soumet/koneksyon'
|
||||
import Dekoneksyon from '../components/soumet/dekoneksyon'
|
||||
import EkriTeks from '../components/soumet/ekri-teks'
|
||||
|
||||
import {jwennTeksEpiUserId} from '../lib/oki-api'
|
||||
|
||||
@@ -25,7 +25,7 @@ export default function Kont() {
|
||||
}, [session])
|
||||
|
||||
return (
|
||||
<HeadLayout title='Kont' tab={3} slug='kont'>
|
||||
<HeadLayout title='Soumèt' tab={3} slug='soumet'>
|
||||
{!session && (
|
||||
<Koneksyon />
|
||||
)}
|
||||
Reference in New Issue
Block a user