mirror of
https://github.com/FranP-code/Hangman-game-with-React.git
synced 2025-10-13 00:42:32 +00:00
Admin place demo look done
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import React from 'react'
|
||||
import { withRouter } from 'react-router'
|
||||
|
||||
const AditionalText = (props) => {
|
||||
|
||||
return (
|
||||
<p
|
||||
className="aditional-text"
|
||||
onClick={() => props.history.push(props.link)}>
|
||||
{props.text}
|
||||
</p>
|
||||
)
|
||||
}
|
||||
|
||||
export default withRouter(AditionalText)
|
||||
@@ -1,5 +1,6 @@
|
||||
import React, {useState} from 'react'
|
||||
import Loading from '../../../../Game/components/Loading/Loading'
|
||||
import AditionalText from './AditionalText/AditionalText'
|
||||
import MessageContainer from './MessageContainer'
|
||||
import FormActions from './Scripts/FormActions'
|
||||
|
||||
@@ -130,6 +131,8 @@ const Form = () => {
|
||||
<Loading />
|
||||
: null
|
||||
}
|
||||
<AditionalText text={'Admin place demo look'} link={'/demo-admin-place'}/>
|
||||
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, {useState} from 'react'
|
||||
import AddCategoryToFirebase from './Firebase Querys/AddCategoryToFirebase'
|
||||
import Loading from '../../Loading/Loading'
|
||||
import Messages from '../../Messages/Messages'
|
||||
import Loading from '../../../../Loading/Loading'
|
||||
import Messages from '../../../../Messages/Messages'
|
||||
import SendMeEmail from '../../Email/SendMeEmail'
|
||||
|
||||
const AddCategory = () => {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import React, {useState} from 'react'
|
||||
import Loading from '../../Loading/Loading'
|
||||
import Loading from '../../../../Loading/Loading'
|
||||
import BringCategories from './Firebase Querys/BringCategories'
|
||||
import BringLanguages from './Firebase Querys/BringLanguages'
|
||||
import capitalize from '../../Scripts/Capilazate'
|
||||
import Messages from '../../Messages/Messages'
|
||||
import Messages from '../../../../Messages/Messages'
|
||||
import AddWordToFirebase from './Firebase Querys/AddWordToFirebase'
|
||||
import SendMeEmail from '../../Email/SendMeEmail'
|
||||
|
||||
@@ -39,6 +39,12 @@ const AddWord = () => {
|
||||
|
||||
}, [])
|
||||
|
||||
const changeLanguage = (e) => {
|
||||
|
||||
setLanguageSelection(e.target.value)
|
||||
setCategorySelection(false)
|
||||
}
|
||||
|
||||
const submitInformation = async (e) => {
|
||||
|
||||
e.preventDefault()
|
||||
@@ -132,7 +138,7 @@ const AddWord = () => {
|
||||
onSubmit={(e) => submitInformation(e)}
|
||||
>
|
||||
<select
|
||||
onChange={(e) => setLanguageSelection(e.target.value)}
|
||||
onChange={(e) => changeLanguage(e)}
|
||||
value={languageSelection}
|
||||
>
|
||||
<option value="default">Select language</option>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react'
|
||||
import SendMeEmail from '../../Email/SendMeEmail'
|
||||
import Loading from '../../Loading/Loading'
|
||||
import Messages from '../../Messages/Messages'
|
||||
import Loading from '../../../../Loading/Loading'
|
||||
import Messages from '../../../../Messages/Messages'
|
||||
import capitalize from '../../Scripts/Capilazate'
|
||||
import BringCategories from './Firebase Querys/BringCategories'
|
||||
import DeleteCategoryFirebase from './Firebase Querys/DeleteCategoryFirebase'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, {useState} from 'react'
|
||||
import SendMeEmail from '../../Email/SendMeEmail'
|
||||
import Loading from '../../Loading/Loading'
|
||||
import Messages from '../../Messages/Messages'
|
||||
import Loading from '../../../../Loading/Loading'
|
||||
import Messages from '../../../../Messages/Messages'
|
||||
import capitalize from '../../Scripts/Capilazate'
|
||||
import BringCategories from '../AddWord/Firebase Querys/BringCategories'
|
||||
import BringLanguages from '../AddWord/Firebase Querys/BringLanguages'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, {useState} from 'react'
|
||||
import SendMeEmail from '../../Email/SendMeEmail'
|
||||
import Loading from '../../Loading/Loading'
|
||||
import Messages from '../../Messages/Messages'
|
||||
import Loading from '../../../../Loading/Loading'
|
||||
import Messages from '../../../../Messages/Messages'
|
||||
import capitalize from '../../Scripts/Capilazate'
|
||||
import BringLanguages from '../AddWord/Firebase Querys/BringLanguages'
|
||||
import BringCategories from './Firebase Querys/BringCategories'
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
import React from 'react'
|
||||
import loadingGifLightTheme from './loading-light-theme.png'
|
||||
|
||||
const Loading = () => {
|
||||
return (
|
||||
<div className='loading'>
|
||||
<img src={loadingGifLightTheme} alt="loading" />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default Loading
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 26 KiB |
@@ -1,35 +0,0 @@
|
||||
import React from 'react'
|
||||
|
||||
const Messages = ({data}) => {
|
||||
|
||||
const [sucess, setSucess] = React.useState('')
|
||||
const [message, setMessage] = React.useState('')
|
||||
|
||||
React.useEffect(() => {
|
||||
|
||||
if (data === '') {
|
||||
|
||||
data['sucess'] = true
|
||||
data['message'] = 'TEST'
|
||||
}
|
||||
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<>
|
||||
{
|
||||
|
||||
data['sucess'] ?
|
||||
<div className="message animate__animated animate__slideInDown sucess">
|
||||
{data['message']}
|
||||
</div>
|
||||
:
|
||||
<div className="message animate__animated animate__slideInDown error">
|
||||
{data['message']}
|
||||
</div>
|
||||
}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default Messages
|
||||
@@ -3,8 +3,10 @@ import {withRouter} from 'react-router'
|
||||
|
||||
const AdminHeader = (props) => {
|
||||
return (
|
||||
<header>
|
||||
<h1>Admin Place</h1>
|
||||
<header className={props.demo === true ? 'demo' : null}>
|
||||
{
|
||||
props.demo === true ? <h1>Admin Place <span className='demoSpan'>Demo!</span></h1> : <h1>Admin Place</h1>
|
||||
}
|
||||
<button
|
||||
className="redirect-button"
|
||||
onClick={() => props.history.push('/')}
|
||||
|
||||
Reference in New Issue
Block a user