Skip to content

Commit

Permalink
change layout color
Browse files Browse the repository at this point in the history
  • Loading branch information
karenyov committed Mar 26, 2023
1 parent 0e6a678 commit 53e5a69
Show file tree
Hide file tree
Showing 8 changed files with 191 additions and 124 deletions.
38 changes: 38 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@
"react": "18.2.0",
"react-dom": "18.2.0",
"react-file-base64": "^1.0.3",
"react-hook-currency": "^0.1.0",
"react-hook-form": "^7.42.1",
"react-icons": "^4.7.1",
"react-input-mask": "^2.0.4",
"react-number-format": "^5.1.4",
"react-text-mask": "^5.5.0",
"recharts": "^2.3.2",
"text-mask-addons": "^3.8.0",
Expand Down
4 changes: 3 additions & 1 deletion src/components/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ interface Props extends InputProps {
size: string;
iconLeft?: React.ReactNode | null;
errorMessage?: string | null;
as?: any | undefined;
}

export const Input = forwardRef(
({ type = "text", size, isInvalid, errorMessage = null, iconLeft = null, ...rest }: Props, ref) => {
({ type = "text", size, isInvalid, errorMessage = null, iconLeft = null, as=null,...rest }: Props, ref) => {
const { colorMode } = useColorMode();
const [showPassword, setShowPassword] = useState(false);

Expand All @@ -35,6 +36,7 @@ export const Input = forwardRef(
type={type === "password" && showPassword ? "text" : type}
placeholder="medium size"
size={size}
as={as}
{...rest}
ref={ref}
isInvalid={invalid}
Expand Down
5 changes: 4 additions & 1 deletion src/components/template/NavbarTop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,10 @@ export default function NavbarTop() {
</HStack>
<ButtonGroup variant="link" spacing="8">
{menuList.map((item) => {
if (user.role == item.role) {
if (
(user.name !== "admin" && item.role === "ROLE_MANAGER") ||
(user.name === "admin" && item.role === user.role)
) {
return (
<Button
color="white"
Expand Down
16 changes: 9 additions & 7 deletions src/components/template/PanelRightBrand.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import { Box, Container, Hide, SimpleGrid, Stack, Text } from "@chakra-ui/react";

import Image from "next/image";
import Link from "next/link";

import pig from "../../assets/pig.png";
import logo from "../../assets/_light/logo.png";
Expand All @@ -20,16 +21,17 @@ export default function PanelRightBrand({ children }: Props) {
<Box bg="primary.500" h="calc(100vh)">
<Container p={20}>
<Stack spacing={4} alignItems="center" mt={5}>
<Image
src={logo}
alt="Brand Image"
style={{ height: "auto", width: "90%" }}
/>

<Link href="/">
<Image
src={logo}
alt="Brand Image"
style={{ height: "auto", width: "90%" }}
/>
</Link>
<Image
src={pig}
alt="Pig Image"
style={{ height: "auto", width: "65%", marginTop: '40px' }}
style={{ height: "auto", width: "65%", marginTop: "40px" }}
/>
</Stack>
</Container>
Expand Down
1 change: 0 additions & 1 deletion src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ export default function Home() {
loadRegister(session.user.id);
}
} else {
console.log("signIn");
router.push({
pathname: "/signIn",
});
Expand Down
Loading

0 comments on commit 53e5a69

Please sign in to comment.