Skip to content

Commit

Permalink
chore(v1): fix problem from eslint & fix some styles
Browse files Browse the repository at this point in the history
  • Loading branch information
hendraaagil committed Jun 12, 2021
1 parent 5e447ad commit 88d81e5
Show file tree
Hide file tree
Showing 13 changed files with 40 additions and 31 deletions.
2 changes: 1 addition & 1 deletion components/about/Card.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const Card = ({ title, skills }) => (
transform: 'translateY(-3px);',
}}
>
<Heading as="h3" size="md" mb={2} fontWeight="600">
<Heading as="h3" size="md" mb={2}>
{title}
</Heading>
{skills.map((skill, index) => (
Expand Down
2 changes: 1 addition & 1 deletion components/about/Description.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Box, Text } from '@chakra-ui/react';

import { getAge } from '../../lib/age';
import getAge from '../../lib/age';
import CustomLink from './CustomLink';

const Description = () => (
Expand Down
14 changes: 7 additions & 7 deletions components/blog/MarkdownComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@ const MarkdownComponent = ({ markdownContent }) => {
remarkPlugins={[gfm]}
components={{
a: ({ children, href }) => (
<Link href={href} isExternal color="brand.blue" textDecor="underline">
<Link
href={href}
isExternal
color="brand.blue"
fontWeight="600"
textDecor="underline"
>
{children}
</Link>
),
Expand Down Expand Up @@ -77,7 +83,6 @@ const MarkdownComponent = ({ markdownContent }) => {
id={id}
fontSize="4xl"
my={3}
fontWeight="600"
lineHeight="tall"
_hover={{ textDecor: 'underline' }}
>
Expand All @@ -95,7 +100,6 @@ const MarkdownComponent = ({ markdownContent }) => {
id={id}
fontSize="3xl"
my={3}
fontWeight="600"
lineHeight="tall"
_hover={{ textDecor: 'underline' }}
>
Expand All @@ -113,7 +117,6 @@ const MarkdownComponent = ({ markdownContent }) => {
id={id}
fontSize="2xl"
my={3}
fontWeight="600"
lineHeight="tall"
_hover={{ textDecor: 'underline' }}
>
Expand All @@ -131,7 +134,6 @@ const MarkdownComponent = ({ markdownContent }) => {
id={id}
fontSize="xl"
my={3}
fontWeight="600"
lineHeight="tall"
_hover={{ textDecor: 'underline' }}
>
Expand All @@ -149,7 +151,6 @@ const MarkdownComponent = ({ markdownContent }) => {
id={id}
fontSize="lg"
my={3}
fontWeight="600"
lineHeight="tall"
_hover={{ textDecor: 'underline' }}
>
Expand All @@ -167,7 +168,6 @@ const MarkdownComponent = ({ markdownContent }) => {
id={id}
fontSize="md"
my={3}
fontWeight="600"
lineHeight="tall"
_hover={{ textDecor: 'underline' }}
>
Expand Down
4 changes: 3 additions & 1 deletion lib/age.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
export const getAge = () => {
const getAge = () => {
const diff = Date.now() - new Date('2003, 09, 26').getTime();
const age = new Date(diff);

return Math.abs(age.getUTCFullYear() - 1970);
};

export default getAge;
2 changes: 1 addition & 1 deletion next-seo.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getAge } from './lib/age';
import getAge from './lib/age';

const title = 'Hendra Agil';
const description = `Hello, my name is Hendra Agil Syaputra. Usually called Hendra / Agil. I'm currently ${getAge()} years old. Born and live in Karanganyar, Central Java, Indonesia.`;
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
},
"dependencies": {
"@chakra-ui/react": "^1.6.2",
"@chakra-ui/theme-tools": "^1.1.7",
"@emotion/react": "11",
"@emotion/styled": "11",
"contentful": "^8.3.5",
Expand Down
24 changes: 15 additions & 9 deletions pages/404.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
import { Box, Heading, Text } from '@chakra-ui/react';
import { Box, Flex, Heading, Text } from '@chakra-ui/react';

const NotFound = () => (
<Box py={40} textAlign="center">
<Heading as="h1" mb={4} size="3xl">
404
</Heading>
<Text fontSize="2xl" fontWeight="600">
Halaman tidak ditemukan.
</Text>
</Box>
<Flex align="center" justify="center" minH="100vh">
<Box
textAlign="center"
bgGradient="linear(to-t, brand.dark, brand.blue)"
bgClip="text"
>
<Heading as="h1" mb={4} size="3xl">
404
</Heading>
<Text fontSize="2xl" fontWeight="600">
Halaman tidak ditemukan.
</Text>
</Box>
</Flex>
);

export default NotFound;
4 changes: 2 additions & 2 deletions pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { Box, ChakraProvider, Container } from '@chakra-ui/react';
import { AnimatePresence, motion } from 'framer-motion';

import SEO from '../next-seo.config';
import { theme } from '../styles/theme';
import { GlobalStyle } from '../styles/GlobalStyle';
import theme from '../styles/theme';
import GlobalStyle from '../styles/GlobalStyle';
import '../styles/css/nprogress.css';

import Navbar from '../components/nav/Navbar';
Expand Down
2 changes: 1 addition & 1 deletion pages/_document.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default class MyDocument extends NextDocument {
</Head>

<body>
<ColorModeScript />
<ColorModeScript initialColorMode="light" />
<Main />
<NextScript />
</body>
Expand Down
2 changes: 1 addition & 1 deletion pages/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Box, Flex, Heading, Text } from '@chakra-ui/react';

import { getAge } from '../lib/age';
import getAge from '../lib/age';

export default function Home() {
return (
Expand Down
8 changes: 3 additions & 5 deletions styles/GlobalStyle.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Global, css } from '@emotion/react';

export const GlobalStyle = ({ children }) => (
const GlobalStyle = ({ children }) => (
<>
<Global
styles={css`
Expand All @@ -27,10 +27,6 @@ export const GlobalStyle = ({ children }) => (
scoll-behavior: smooth;
cursor: default;
}
b,
strong {
font-weight: 600;
}
#__next {
display: flex;
flex-direction: column;
Expand All @@ -44,3 +40,5 @@ export const GlobalStyle = ({ children }) => (
{children}
</>
);

export default GlobalStyle;
4 changes: 3 additions & 1 deletion styles/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const breakpoints = createBreakpoints({
'2xl': '1440px',
});

export const theme = extendTheme({
const theme = extendTheme({
fonts: {
heading: `'Lexend', ${defaultTheme.fonts.heading}`,
body: `'Lexend', ${defaultTheme.fonts.body}`,
Expand All @@ -23,3 +23,5 @@ export const theme = extendTheme({
},
breakpoints,
});

export default theme;
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@
"@chakra-ui/form-control" "1.3.6"
"@chakra-ui/utils" "1.8.0"

"@chakra-ui/theme-tools@1.1.7":
"@chakra-ui/theme-tools@1.1.7", "@chakra-ui/theme-tools@^1.1.7":
version "1.1.7"
resolved "https://registry.yarnpkg.com/@chakra-ui/theme-tools/-/theme-tools-1.1.7.tgz#ffd3dc2d22a935e1a1df47b155c4cef60ff3f603"
integrity sha512-i8KpxjgoQPsoWAyHX+4kRMSioN9WVfyky+2sdFDHhEuDNL/iNYfKQMZjt8RR67apK/dSswMqh5UF2lWSM+lQhw==
Expand Down

1 comment on commit 88d81e5

@vercel
Copy link

@vercel vercel bot commented on 88d81e5 Jun 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.