merging
This commit is contained in:
parent
af143a2ecc
commit
19c8bcd6eb
|
@ -1,29 +1,29 @@
|
|||
import React from "react";
|
||||
import LoginStyle from "./Login.style";
|
||||
import AccountCircleIcon from "@mui/icons-material/AccountCircle";
|
||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||
import React from 'react'
|
||||
import LoginStyle from './Login.style'
|
||||
import AccountCircleIcon from '@mui/icons-material/AccountCircle'
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
||||
import {
|
||||
faUser,
|
||||
faEnvelope,
|
||||
faLock,
|
||||
faClose,
|
||||
} from "@fortawesome/free-solid-svg-icons";
|
||||
import { UserContext } from "../../pages/user/usercontext";
|
||||
import { useState } from "react";
|
||||
import Link from "next/link";
|
||||
import { useContext } from "react";
|
||||
} from '@fortawesome/free-solid-svg-icons'
|
||||
import { UserContext } from '../../helpers/user/usercontext'
|
||||
import { useState } from 'react'
|
||||
import Link from 'next/link'
|
||||
import { useContext } from 'react'
|
||||
|
||||
function Login() {
|
||||
const [userData, setUserData] = useState({
|
||||
email: "",
|
||||
password: "",
|
||||
});
|
||||
email: '',
|
||||
password: '',
|
||||
})
|
||||
|
||||
const handleInput = (event) => {
|
||||
const name = event.target.name;
|
||||
const value = event.target.value;
|
||||
setUserData({ ...userData, [name]: value });
|
||||
};
|
||||
const name = event.target.name
|
||||
const value = event.target.value
|
||||
setUserData({ ...userData, [name]: value })
|
||||
}
|
||||
|
||||
return (
|
||||
<LoginStyle>
|
||||
|
@ -38,7 +38,7 @@ function Login() {
|
|||
src="/images/user.png"
|
||||
width={100}
|
||||
height={100}
|
||||
style={{ "margin-bottom": 20 }}
|
||||
style={{ 'margin-bottom': 20 }}
|
||||
></img>
|
||||
|
||||
<div className="reg-field">
|
||||
|
@ -82,6 +82,6 @@ function Login() {
|
|||
</p>
|
||||
</form>
|
||||
</LoginStyle>
|
||||
);
|
||||
)
|
||||
}
|
||||
export default Login;
|
||||
export default Login
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { useContext } from "react";
|
||||
import React, { useContext } from 'react'
|
||||
import {
|
||||
Avatar,
|
||||
Box,
|
||||
|
@ -11,51 +11,51 @@ import {
|
|||
Tooltip,
|
||||
Typography,
|
||||
alpha,
|
||||
} from "@mui/material";
|
||||
import GitHubIcon from "@mui/icons-material/GitHub";
|
||||
import MenuIcon from "@mui/icons-material/Menu";
|
||||
import NavbarStyle from "./Navbar.style";
|
||||
import Logo from "./Logo";
|
||||
import UserAuth, { UserContext } from "pages/user/usercontext";
|
||||
import Link from "next/link";
|
||||
const settings = ["Profile", "Account", "Dashboard", "Logout"];
|
||||
} from '@mui/material'
|
||||
import GitHubIcon from '@mui/icons-material/GitHub'
|
||||
import MenuIcon from '@mui/icons-material/Menu'
|
||||
import NavbarStyle from './Navbar.style'
|
||||
import Logo from './Logo'
|
||||
import UserAuth, { UserContext } from 'helpers/user/usercontext'
|
||||
import Link from 'next/link'
|
||||
const settings = ['Profile', 'Account', 'Dashboard', 'Logout']
|
||||
|
||||
function Index(props) {
|
||||
const [anchorElNav, setAnchorElNav] = React.useState(null);
|
||||
const [anchorElUser, setAnchorElUser] = React.useState(null);
|
||||
const [anchorElNav, setAnchorElNav] = React.useState(null)
|
||||
const [anchorElUser, setAnchorElUser] = React.useState(null)
|
||||
|
||||
const handleOpenNavMenu = (event) => {
|
||||
setAnchorElNav(event.currentTarget);
|
||||
};
|
||||
setAnchorElNav(event.currentTarget)
|
||||
}
|
||||
const handleOpenUserMenu = (event) => {
|
||||
setAnchorElUser(event.currentTarget);
|
||||
};
|
||||
setAnchorElUser(event.currentTarget)
|
||||
}
|
||||
|
||||
const handleCloseNavMenu = () => {
|
||||
setAnchorElNav(null);
|
||||
};
|
||||
setAnchorElNav(null)
|
||||
}
|
||||
|
||||
const handleCloseUserMenu = () => {
|
||||
setAnchorElUser(null);
|
||||
};
|
||||
setAnchorElUser(null)
|
||||
}
|
||||
|
||||
const { user, login, logout } = useContext(UserAuth);
|
||||
const { user, login, logout } = useContext(UserAuth)
|
||||
|
||||
return (
|
||||
<NavbarStyle
|
||||
position="relative"
|
||||
sx={{ bgcolor: alpha("#000000", 0.5), m: "0px" }}
|
||||
sx={{ bgcolor: alpha('#000000', 0.5), m: '0px' }}
|
||||
>
|
||||
<Container maxWidth="xl">
|
||||
<Toolbar disableGutters="false">
|
||||
<Typography variant="h4" sx={{ fontWeight: "bold" }}>
|
||||
<Typography variant="h4" sx={{ fontWeight: 'bold' }}>
|
||||
URL MINIFY
|
||||
</Typography>
|
||||
<Box
|
||||
sx={{
|
||||
flexGrow: 1,
|
||||
flexDirection: "row-reverse",
|
||||
display: { xs: "flex", md: "none" },
|
||||
flexDirection: 'row-reverse',
|
||||
display: { xs: 'flex', md: 'none' },
|
||||
}}
|
||||
>
|
||||
<IconButton
|
||||
|
@ -72,33 +72,33 @@ function Index(props) {
|
|||
id="menu-appbar"
|
||||
anchorEl={anchorElNav}
|
||||
anchorOrigin={{
|
||||
vertical: "bottom",
|
||||
horizontal: "left",
|
||||
vertical: 'bottom',
|
||||
horizontal: 'left',
|
||||
}}
|
||||
keepMounted
|
||||
transformOrigin={{
|
||||
vertical: "top",
|
||||
horizontal: "left",
|
||||
vertical: 'top',
|
||||
horizontal: 'left',
|
||||
}}
|
||||
open={Boolean(anchorElNav)}
|
||||
onClose={handleCloseNavMenu}
|
||||
sx={{
|
||||
display: { xs: "block", md: "none" },
|
||||
display: { xs: 'block', md: 'none' },
|
||||
}}
|
||||
>
|
||||
<MenuItem onClick={handleCloseNavMenu}>
|
||||
<a
|
||||
href="https://github.com/BRAVO68WEB/url-minify"
|
||||
target={"_blank"}
|
||||
target={'_blank'}
|
||||
>
|
||||
<Typography textAlign="center" sx={{ display: "flex" }}>
|
||||
<Typography textAlign="center" sx={{ display: 'flex' }}>
|
||||
<GitHubIcon fontSize="small" />
|
||||
GitHub
|
||||
</Typography>
|
||||
</a>
|
||||
</MenuItem>
|
||||
<MenuItem onClick={handleCloseNavMenu}>
|
||||
<Typography textAlign="center" sx={{ display: "flex" }}>
|
||||
<Typography textAlign="center" sx={{ display: 'flex' }}>
|
||||
CREDITS
|
||||
</Typography>
|
||||
</MenuItem>
|
||||
|
@ -108,27 +108,27 @@ function Index(props) {
|
|||
<Box
|
||||
sx={{
|
||||
flexGrow: 1,
|
||||
flexDirection: "row-reverse",
|
||||
gap: "10px",
|
||||
px: "20px",
|
||||
display: { xs: "none", md: "flex" },
|
||||
flexDirection: 'row-reverse',
|
||||
gap: '10px',
|
||||
px: '20px',
|
||||
display: { xs: 'none', md: 'flex' },
|
||||
}}
|
||||
>
|
||||
<a
|
||||
href="https://github.com/BRAVO68WEB/url-minify"
|
||||
target={"_blank"}
|
||||
target={'_blank'}
|
||||
>
|
||||
<Button
|
||||
onClick={handleCloseNavMenu}
|
||||
sx={{
|
||||
color: "white",
|
||||
display: "flex",
|
||||
gap: "10px",
|
||||
fontSize: "h5.fontSize",
|
||||
fontFamily: "sans-serif",
|
||||
fontStyle: "bold",
|
||||
textTransform: "capitalize",
|
||||
fontWeight: "bold",
|
||||
color: 'white',
|
||||
display: 'flex',
|
||||
gap: '10px',
|
||||
fontSize: 'h5.fontSize',
|
||||
fontFamily: 'sans-serif',
|
||||
fontStyle: 'bold',
|
||||
textTransform: 'capitalize',
|
||||
fontWeight: 'bold',
|
||||
}}
|
||||
>
|
||||
<GitHubIcon fontSize="large" />
|
||||
|
@ -137,7 +137,7 @@ function Index(props) {
|
|||
</a>
|
||||
<Button
|
||||
onClick={handleCloseNavMenu}
|
||||
sx={{ color: "white", display: "block", fontSize: "h5.fontSize" }}
|
||||
sx={{ color: 'white', display: 'block', fontSize: 'h5.fontSize' }}
|
||||
>
|
||||
CREDITS
|
||||
</Button>
|
||||
|
@ -155,17 +155,17 @@ function Index(props) {
|
|||
</IconButton>
|
||||
</Tooltip>
|
||||
<Menu
|
||||
sx={{ mt: "45px" }}
|
||||
sx={{ mt: '45px' }}
|
||||
id="menu-appbar"
|
||||
anchorEl={anchorElUser}
|
||||
anchorOrigin={{
|
||||
vertical: "top",
|
||||
horizontal: "right",
|
||||
vertical: 'top',
|
||||
horizontal: 'right',
|
||||
}}
|
||||
keepMounted
|
||||
transformOrigin={{
|
||||
vertical: "top",
|
||||
horizontal: "right",
|
||||
vertical: 'top',
|
||||
horizontal: 'right',
|
||||
}}
|
||||
open={Boolean(anchorElUser)}
|
||||
onClose={handleCloseUserMenu}
|
||||
|
@ -185,7 +185,7 @@ function Index(props) {
|
|||
</Toolbar>
|
||||
</Container>
|
||||
</NavbarStyle>
|
||||
);
|
||||
)
|
||||
}
|
||||
|
||||
export default Index;
|
||||
export default Index
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import '../styles/globals.css'
|
||||
import '../styles/logostyles.css'
|
||||
import '../styles/styles.css'
|
||||
import { UserAuthProvider } from './user/usercontext'
|
||||
import { UserAuthProvider } from '../helpers/user/usercontext'
|
||||
|
||||
function MyApp({ Component, pageProps }) {
|
||||
return (
|
||||
|
|
|
@ -5,7 +5,7 @@ import NavBar from 'components/NavBar'
|
|||
import Features from 'components/Features'
|
||||
import Reg from 'components/Reg/Reg'
|
||||
import Login from 'components/Login/Login'
|
||||
import { UserAuthProvider, UserContext } from './user/usercontext'
|
||||
import { UserAuthProvider, UserContext } from '../helpers/user/usercontext'
|
||||
|
||||
export default function Home() {
|
||||
const [shortUrl, setShortUrl] = useState(null)
|
||||
|
|
Loading…
Reference in New Issue