diff --git a/components/navigasyon.js b/components/navigasyon.js index 792fd83..dfb40af 100644 --- a/components/navigasyon.js +++ b/components/navigasyon.js @@ -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}) { } {...a11yProps(0)} /> } {...a11yProps(1)} /> } {...a11yProps(2)} /> - } {...a11yProps(3)} /> + } {...a11yProps(3)} /> diff --git a/components/kont/dekoneksyon.js b/components/soumet/dekoneksyon.js similarity index 100% rename from components/kont/dekoneksyon.js rename to components/soumet/dekoneksyon.js diff --git a/components/kont/ekri-teks.js b/components/soumet/ekri-teks.js similarity index 94% rename from components/kont/ekri-teks.js rename to components/soumet/ekri-teks.js index 3141cfa..499aa3f 100644 --- a/components/kont/ekri-teks.js +++ b/components/soumet/ekri-teks.js @@ -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 ( - - Soumettre un texte - + + + Soumèt an tèks + + + (soumettre un texte) + +
@@ -170,7 +176,7 @@ function EkriTeks({session}) { - {loading && } + {loading && } {success && ( diff --git a/components/kont/koneksyon.js b/components/soumet/koneksyon.js similarity index 97% rename from components/kont/koneksyon.js rename to components/soumet/koneksyon.js index 7bb0e3e..e9de86b 100644 --- a/components/kont/koneksyon.js +++ b/components/soumet/koneksyon.js @@ -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 = () => { diff --git a/pages/api/auth/[...nextauth].js b/pages/api/auth/[...nextauth].js index 1cc8594..5d73926 100644 --- a/pages/api/auth/[...nextauth].js +++ b/pages/api/auth/[...nextauth].js @@ -48,8 +48,8 @@ const options = { } }, pages: { - signIn: '/kont', - error: '/kont' + signIn: '/soumet', + error: '/soumet' } } const Auth = (request, response) => diff --git a/pages/kont.js b/pages/soumet.js similarity index 78% rename from pages/kont.js rename to pages/soumet.js index 8a3e64e..65b37bb 100644 --- a/pages/kont.js +++ b/pages/soumet.js @@ -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 ( - + {!session && ( )}