Skip to content

Commit 2ad0232

Browse files
committed
fix build errors and run format script
1 parent 4d851d5 commit 2ad0232

33 files changed

+18712
-18712
lines changed

.eslintrc.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"extends": [
33
"eslint:recommended",
44
"next",
5-
// "next/babel",
65
"next/core-web-vitals",
76
"prettier"
87
],

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
## Getting Started
22

33
First, install dependencies:
4+
45
```bash
56
npm install
67
# or
78
yarn
89
```
10+
911
Then run the development server:
12+
1013
```bash
1114
npm run dev
1215
# or
@@ -16,17 +19,20 @@ yarn dev
1619
### Settings
1720

1821
Create a file `.env.local` and put inside:
22+
1923
1. NEXT_PUBLIC_SANITY_URL="https://f2g1h82s.api.sanity.io/v2021-10-21/data/query/production", where **f2g1h82s** is your sanity project ID
2024
2. NEXT_PUBLIC_SANITY_LATEST_PROJECTS="?query=...", your query to get latest projects
2125
3. NEXT_PUBLIC_SANITY_ALL_PROJECTS="?query=...", your query to get all projects
2226
4. NEXT_PUBLIC_SANITY_TOKEN="", sanity token created in sanity studio under API section
2327

2428
Run Sanity (localhost:3333)
2529

26-
2730
#### **`!!! Make sure to have installed Sanity globally`**
31+
2832
Then:
33+
2934
```bash
3035
cd sanity && sanity start
3136
```
32-
It runs local server at localhost:3333
37+
38+
It runs local server at localhost:3333

app/sections/project/index.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import Link from "next/link";
44
import useSWR from "swr";
55
import { HeadingDivider, Loader } from "components";
66
import { fetcher } from "utils/fetcher";
7-
import { SiteRoutes } from "constants";
87
import Error from "../../error";
98
import { ErrorBoundary } from "react-error-boundary";
109
import { Projects } from "../../projects/components/Projects";
10+
import { SITE_ROUTES } from "../../../constants";
1111

1212
const url = `${process.env.NEXT_PUBLIC_SANITY_URL}${process.env.NEXT_PUBLIC_SANITY_LATEST_PROJECTS}`;
1313

@@ -42,7 +42,7 @@ export function ProjectsSection() {
4242
</Suspense>
4343

4444
<Link
45-
href={SiteRoutes.projects}
45+
href={SITE_ROUTES.projects}
4646
tabIndex={-1}
4747
aria-label="Go to projects page"
4848
ref={btnRef}

app/sections/technologies/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useRef } from "react";
22
import { LazyMotion, domAnimation, useInView } from "framer-motion";
33
import { HeadingDivider } from "components";
4-
import { TECHNOLOGIES } from "constants";
4+
import { TECHNOLOGIES } from "../../../constants";
55

66
export function TechnologiesSection() {
77
const textRef = useRef(null);

components/AppMetadata.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ const description =
33
"Software developer from Moldova, Republic of, who loves to develop beautiful websites, single page applications, customer relationship management or code from scratch using React and Next.js";
44
const url = "https://vasile-novatchii.netlify.app";
55
export const AppMetadata = {
6+
metadataBase: new URL("https://vasile-novatchii.netlify.app/"),
67
title: {
78
default: `Portfolio | ${author}`,
89
template: `%s | ${author}`
@@ -13,7 +14,9 @@ export const AppMetadata = {
1314
},
1415
keywords: [
1516
"Vasile Novatchii",
16-
"Vasile Novatchii - developer",
17+
"Vasile Novatchii - software developer",
18+
"Frontend developer",
19+
"Flutter developer",
1720
"Portfolio website",
1821
"Frontend Developer Portfolio"
1922
],

components/ConnectMedia.jsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,14 @@
22

33
import { LazyMotion, domAnimation, m } from "framer-motion";
44
import { initial, animate, exit, transition } from "utils/motions";
5-
import { socialMedia } from "constants";
5+
import { SOCIAL_MEDIA } from "../constants";
66

77
export function ConnectMedia() {
8-
if (socialMedia.length === 0) {
9-
return null;
10-
}
11-
128
return (
139
<LazyMotion features={domAnimation}>
1410
<m.nav role="menu" initial={initial} animate={animate} exit={exit} transition={transition}>
1511
<ul className="flex items-center gap-5">
16-
{socialMedia.map((item) => (
12+
{SOCIAL_MEDIA.map((item) => (
1713
<li key={item.id}>
1814
<a
1915
href={item.url}

components/Logo.jsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import Link from "next/link";
44
import { usePathname } from "next/navigation";
55
import { LazyMotion, domAnimation, m } from "framer-motion";
66
import { initial, animate, exit, transition } from "utils/motions";
7-
import { SiteRoutes, SiteStrings } from "constants";
7+
import { SITE_ROUTES, SITE_STRINGS } from "../constants";
88

99
export function Logo() {
1010
const pathname = usePathname();
@@ -18,12 +18,12 @@ export function Logo() {
1818
exit={exit}
1919
transition={transition}
2020
>
21-
{pathname === SiteRoutes?.projects ? (
22-
<Link href={SiteRoutes.home} aria-label="Go to home page" role="link">
23-
{SiteStrings?.textLogo}
21+
{pathname === SITE_ROUTES.projects ? (
22+
<Link href={SITE_ROUTES.home} aria-label="Go to home page" role="link">
23+
{SITE_STRINGS.textLogo}
2424
</Link>
2525
) : (
26-
<>{SiteStrings?.textLogo}</>
26+
<>{SITE_STRINGS.textLogo}</>
2727
)}
2828
</m.h3>
2929
</LazyMotion>

components/Menu.jsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { LazyMotion, domAnimation, m } from "framer-motion";
66
import { useScrollTo } from "hooks";
77
import { BsArrowReturnLeft } from "react-icons/bs";
88
import { initial, animate, exit, transition } from "utils";
9-
import { menu, SiteRoutes, SiteStrings } from "constants";
9+
import { MENU_OPTIONS, SITE_ROUTES, SITE_STRINGS } from "../constants";
1010

1111
export function Menu({ onClick = () => {} }) {
1212
let content, mainMenu, backMenu;
@@ -23,7 +23,7 @@ export function Menu({ onClick = () => {} }) {
2323
mainMenu = (
2424
<m.nav initial={initial} animate={animate} exit={exit} transition={transition} role="menu">
2525
<ul className="flex justify-center gap-5 flex-col md:flex-row items-start md:items-center">
26-
{menu?.sort(sortAscending).map((menuItem) => (
26+
{MENU_OPTIONS.sort(sortAscending).map((menuItem) => (
2727
<li key={menuItem.id}>
2828
<a
2929
href={menuItem.url}
@@ -42,21 +42,21 @@ export function Menu({ onClick = () => {} }) {
4242
backMenu = (
4343
<m.div initial={initial} animate={animate} exit={exit} transition={transition}>
4444
<Link
45-
href={SiteRoutes?.home}
46-
title={SiteStrings?.backToMainPageTitle}
45+
href={SITE_ROUTES.home}
46+
title={SITE_STRINGS.backToMainPageTitle}
4747
className="icon-link-btn"
4848
>
4949
<span>
5050
<BsArrowReturnLeft />
5151
</span>
52-
{SiteStrings?.backToMainText}
52+
{SITE_STRINGS.backToMainText}
5353
</Link>
5454
</m.div>
5555
);
5656

57-
content = pathname === SiteRoutes?.projects ? backMenu : mainMenu;
57+
content = pathname === SITE_ROUTES.projects ? backMenu : mainMenu;
5858

59-
if (menu?.length === 0) {
59+
if (MENU_OPTIONS.length === 0) {
6060
return null;
6161
}
6262

constants/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
export * from "./strings";
2-
export * from "./routes.js";
3-
export * from "./menu.js";
4-
export * from "./social_media.js";
5-
export * from "./technologies.js";
1+
export { SITE_STRINGS } from "./strings";
2+
export { SITE_ROUTES } from "./routes.js";
3+
export { MENU_OPTIONS } from "./menu.js";
4+
export { SOCIAL_MEDIA } from "./social_media.js";
5+
export { TECHNOLOGIES } from "./technologies.js";

constants/menu.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export const menu = [
1+
export const MENU_OPTIONS = [
22
{ id: "0", name: "Introduction", url: "#intro" },
33
{ id: "1", name: "About", url: "#about" },
44
{ id: "2", name: "Projects", url: "#projects" },

0 commit comments

Comments
 (0)