Skip to content

Commit

Permalink
build(app): upgrade to next 13 and upgrade other dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
cholazzzb committed Aug 11, 2023
1 parent 7ae41bc commit 1257e32
Show file tree
Hide file tree
Showing 29 changed files with 3,031 additions and 8,941 deletions.
1 change: 0 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"extends": [
"next/core-web-vitals",
"plugin:storybook/recommended",
"prettier"
]
}
2 changes: 1 addition & 1 deletion components/Animation.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import styles from "./Animation.module.css";
import styles from './Animation.module.css';

type BlinkProps = {
children: React.ReactNode;
Expand Down
18 changes: 7 additions & 11 deletions components/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
import Image from "next/image";
import styles from "./Button.module.css";
import Image from 'next/legacy/image';
import styles from './Button.module.css';

type FloatingButtonProps = {
color?: string;
onClick?: () => void;
iconSrc: string;
};
export const FloatingButton = ({
onClick,
iconSrc,
}: FloatingButtonProps) => {

export const FloatingButton = ({ onClick, iconSrc }: FloatingButtonProps) => {
return (
<button
className={`${styles.floatingButton} ${styles.green}`}
Expand All @@ -30,17 +26,17 @@ export const FloatingButton = ({

type IconButtonProps = {
color?: string;
size?: "small" | "medium" | "large";
size?: 'small' | 'medium' | 'large';
iconSrc: string;
onClick?: () => void;
};
export const IconButton = ({
color = "white",
size = "small",
color = 'white',
size = 'small',
onClick,
iconSrc,
}: IconButtonProps) => {
const sizeVal = size === "small" ? 25 : size === "medium" ? 35 : 45;
const sizeVal = size === 'small' ? 25 : size === 'medium' ? 35 : 45;

return (
<button
Expand Down
2 changes: 1 addition & 1 deletion components/Card.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@
align-items: flex-end;
justify-content: center;
width: 100%;
}
}
12 changes: 6 additions & 6 deletions components/Card.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ReactNode } from "react";
import styles from "./Card.module.css";
import { ReactNode } from 'react';
import styles from './Card.module.css';

type CardProps = {
width?: number;
Expand All @@ -15,11 +15,11 @@ export const Card = ({ width = 300, children }: CardProps) => {

type CardHeadProps = {
children?: ReactNode;
justify?: "justifyCenter" | "justifyBetween";
justify?: 'justifyCenter' | 'justifyBetween';
};
export const CardHead = ({
children,
justify = "justifyCenter",
justify = 'justifyCenter',
}: CardHeadProps) => {
return (
<div className={`${styles.cardHead} ${styles[justify]}`}>{children}</div>
Expand All @@ -38,10 +38,10 @@ export const RowCard = ({ children }: RowCardProps) => {
};

type ColCardProps = {
padding?: "small" | "medium" | "large";
padding?: 'small' | 'medium' | 'large';
children?: ReactNode;
};
export const ColCard = ({ padding = "small", children }: ColCardProps) => {
export const ColCard = ({ padding = 'small', children }: ColCardProps) => {
return (
<div className={`${styles.colCard} ${styles[padding]}`}>{children}</div>
);
Expand Down
2 changes: 1 addition & 1 deletion components/Chip.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
margin-bottom: 8px;
}

.white{
.white {
background-color: #fff;
}

Expand Down
4 changes: 2 additions & 2 deletions components/Chip.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import styles from "./Chip.module.css";
import styles from './Chip.module.css';

type ChipProps = {
children: React.ReactNode;
color?: string;
};

const Chip = ({ children, color = "black" }: ChipProps) => {
const Chip = ({ children, color = 'black' }: ChipProps) => {
return <div className={`${styles.chip} ${styles[color]}`}>{children}</div>;
};

Expand Down
10 changes: 5 additions & 5 deletions components/Collection.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Box } from "@chakra-ui/react";
import { Children, ReactNode } from "react";
import AutoSizer from "react-virtualized-auto-sizer";
import { FixedSizeList as List } from "react-window";
import styles from "./Collection.module.css";
import { Box } from '@chakra-ui/react';
import { Children, ReactNode } from 'react';
import AutoSizer from 'react-virtualized-auto-sizer';
import { FixedSizeList as List } from 'react-window';
import styles from './Collection.module.css';

type VerticalCollectionProps = {
children: ReactNode;
Expand Down
4 changes: 2 additions & 2 deletions components/Divider.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import styles from "./Divider.module.css";
import styles from './Divider.module.css';

type DividerProps = {
type: "horizontal" | "vertical";
type: 'horizontal' | 'vertical';
};

const Divider = ({ type }: DividerProps) => {
Expand Down
6 changes: 3 additions & 3 deletions components/ImageContainer.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ReactNode } from "react";
import styles from "./ImageContainer.module.css";
import { ReactNode } from 'react';
import styles from './ImageContainer.module.css';

type ImageContainerProps = {
size: number;
Expand All @@ -10,7 +10,7 @@ type ImageContainerProps = {
const ImageContainer = ({ size, shape, children }: ImageContainerProps) => {
let containerStyle;
switch (shape) {
case "round":
case 'round':
containerStyle = styles.round;
break;

Expand Down
4 changes: 2 additions & 2 deletions components/Modal.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
border-top-right-radius: 40px;
}

.modalBody{
.modalBody {
display: flex;
flex-direction: column;
}
}
6 changes: 3 additions & 3 deletions components/Modal.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ReactNode } from "react";
import { IconButton } from "./Button";
import styles from "./Modal.module.css";
import { ReactNode } from 'react';
import { IconButton } from './Button';
import styles from './Modal.module.css';

type ModalProps = {
children: ReactNode;
Expand Down
2 changes: 1 addition & 1 deletion components/Navigation.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import styles from "./Navigation.module.css";
import styles from './Navigation.module.css';

const Navigation = () => {
return <div className={styles.navigation}>Coba</div>;
Expand Down
12 changes: 6 additions & 6 deletions components/Typography.module.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@import url("https://fonts.googleapis.com/css?family=Caveat|Righteous&display=swap");
@import url('https://fonts.googleapis.com/css?family=Caveat|Righteous&display=swap');

.animatedText {
font-family: "Righteous", cursive;
background: url("../public/images/text-animation.gif") center center no-repeat;
font-family: 'Righteous', cursive;
background: url('../public/images/text-animation.gif') center center no-repeat;
background-clip: text;
-webkit-text-fill-color: transparent;
background-size: cover;
Expand All @@ -11,12 +11,12 @@
color: transparent;
}

.large{
.large {
font-size: 30px;
}

.small{
.small {
font-size: 15px;
display: flex;
align-items: center;
}
}
12 changes: 6 additions & 6 deletions components/Typography.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
import { ReactNode } from "react";
import styles from "./Typography.module.css";
import { ReactNode } from 'react';
import styles from './Typography.module.css';

type TypographyProps = {
type?: string;
children: ReactNode;
};

const Typography = ({ type="small", children }: TypographyProps) => {
const Typography = ({ type = 'small', children }: TypographyProps) => {
let textStyle;
switch (type) {
case "animated-text":
case 'animated-text':
textStyle = styles.animatedText;
break;

case "small":
case 'small':
textStyle = styles.small;
break;

case "large":
case 'large':
textStyle = styles.large;
break;

Expand Down
21 changes: 9 additions & 12 deletions components/about/AccompCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,18 @@ const AccompCard = ({ data }: AccompCardProps) => {
<Typography>{data.description}</Typography>
<Typography>
See the idea:
<Link href={data.link}>
<a
className={styles.link}
target="_blank"
rel="noopener noreferrer"
>
{data.link}
</a>
<Link
href={data.link}
className={styles.link}
target="_blank"
rel="noopener noreferrer"
>
{data.link}
</Link>
</Typography>
<Typography>
<Link href="/pdf/AIC.pdf">
<a target="_blank" rel="noopener noreferrer">
<IconButton iconSrc="/icons/link.svg" />
</a>
<Link href="/pdf/AIC.pdf" target="_blank" rel="noopener noreferrer">
<IconButton iconSrc="/icons/link.svg" />
</Link>
</Typography>
</ColCard>
Expand Down
6 changes: 2 additions & 4 deletions components/about/ExpCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@ const ExpCard = ({ data }: ExpCardProps) => {
<Typography key={task}>{task}</Typography>
))}
<Typography>Tech Stacks: {data.techs}</Typography>
<Link href="/pdf/webTA.pdf">
<a target="_blank" rel="noopener noreferrer">
<IconButton iconSrc="/icons/link.svg" />
</a>
<Link href="/pdf/webTA.pdf" target="_blank" rel="noopener noreferrer">
<IconButton iconSrc="/icons/link.svg" />
</Link>
</ColCard>
</div>
Expand Down
30 changes: 14 additions & 16 deletions components/about/HomeButton.tsx
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
import Link from 'next/link';
import Image from 'next/image';
import Image from 'next/legacy/image';
import ImageContainer from 'components/ImageContainer';
import styles from './HomeButton.module.css';
import { Blink } from 'components/Animation';

const ProjectButton = () => {
return (
<Link href="/">
<a>
<button className={styles.homeButton}>
Home
<Blink>
<ImageContainer size={20} shape="round">
<Image
src="/icons/right.svg"
alt="icon-button"
layout="fill"
objectFit="cover"
/>
</ImageContainer>
</Blink>
</button>
</a>
<button className={styles.homeButton}>
Home
<Blink>
<ImageContainer size={20} shape="round">
<Image
src="/icons/right.svg"
alt="icon-button"
layout="fill"
objectFit="cover"
/>
</ImageContainer>
</Blink>
</button>
</Link>
);
};
Expand Down
30 changes: 14 additions & 16 deletions components/home/AboutButton.tsx
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
import Link from 'next/link';
import Image from 'next/image';
import Image from 'next/legacy/image';
import ImageContainer from 'components/ImageContainer';
import styles from './AboutButton.module.css';
import { Blink } from 'components/Animation';

const AboutButton = () => {
return (
<Link href="/about">
<a>
<button className={styles.aboutButton}>
<Blink>
<ImageContainer size={20} shape="round">
<Image
src="/icons/left.svg"
alt="icon-button"
layout="fill"
objectFit="cover"
/>
</ImageContainer>
</Blink>
About
</button>
</a>
<button className={styles.aboutButton}>
<Blink>
<ImageContainer size={20} shape="round">
<Image
src="/icons/left.svg"
alt="icon-button"
layout="fill"
objectFit="cover"
/>
</ImageContainer>
</Blink>
About
</button>
</Link>
);
};
Expand Down
Loading

0 comments on commit 1257e32

Please sign in to comment.