Skip to content

Commit

Permalink
chore: bump deps (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
RPDeshaies authored Oct 5, 2023
1 parent f4bed3a commit 9eb1e00
Show file tree
Hide file tree
Showing 13 changed files with 76 additions and 67 deletions.
4 changes: 3 additions & 1 deletion app/(components)/ProjectCard/ProjectCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
Image,
Stack,
Text,
useColorModeValue,
} from "@chakra-ui/react";
import { ICreator, IProject } from "public/catalog/loader";

Expand All @@ -18,6 +19,7 @@ export function ProjectCard(props: {
project: IProject;
condensed?: boolean;
}) {
const borderColor = useColorModeValue("gray.200", "gray.800");
return (
<>
<Card
Expand Down Expand Up @@ -67,7 +69,7 @@ export function ProjectCard(props: {
objectFit="cover"
objectPosition="center"
borderBottom="1px"
borderColor="gray.200"
borderColor={borderColor}
position="relative"
margin="0px auto"
display="block"
Expand Down
11 changes: 9 additions & 2 deletions app/(domains)/creators/CreatorsProjectsSorter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@ export const CreatorsProjectSorter = {
});
});

const fariRPGsProjects = ["charge", "dash", "breathless", "firelights"];
const fariRPGsProjects = [
"breathless",
"firelights",
"charge rpg",
"dash",

"hopes & dreams",
];
const fariRecommendedProjects = [
"blades",
"lumen",
Expand All @@ -35,7 +42,7 @@ export const CreatorsProjectSorter = {
const currentDateOfTheMonth = new Date().getDate();
const shuffledFariRecommendedProjects = shuffleWithSeed(
fariRecommendedProjects,
currentDateOfTheMonth
currentDateOfTheMonth,
);
const featuredProjects = [
...fariRPGsProjects,
Expand Down
6 changes: 3 additions & 3 deletions app/(pages)/browse/page.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { ResolvingMetadata } from "next/dist/lib/metadata/types/metadata-interface";
import { loader } from "public/catalog/loader";
import Browse from "./page-component";
import BrowsePage from "./pure";

export async function generateMetadata(
props: Parameters<typeof Page>[0],
parent: ResolvingMetadata
parent: ResolvingMetadata,
) {
return {
title: `Browse - Fari Community`,
Expand All @@ -23,5 +23,5 @@ export async function generateMetadata(
export default async function Page(props: {}) {
const allCreators = await loader.getAllCreators();

return <Browse allCreators={allCreators} />;
return <BrowsePage allCreators={allCreators} />;
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { CreatorsProjectSorter } from "app/(domains)/creators/CreatorsProjectsSo
import { ICreator } from "public/catalog/loader";
import { useState } from "react";

export default function Browse(props: { allCreators: Array<ICreator> }) {
export default function BrowsePage(props: { allCreators: Array<ICreator> }) {
const searchDefaultValue = getClientSideValue(() => {
const searchParams = new URLSearchParams(location.search);
return searchParams.get("search") || "";
Expand Down
6 changes: 3 additions & 3 deletions app/(pages)/creators/[creatorSlug]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { ResolvingMetadata } from "next/dist/lib/metadata/types/metadata-interface";
import { loader } from "public/catalog/loader";
import { Creator } from "./page-component";
import { CreatorPage } from "./pure";

export async function generateMetadata(
props: Parameters<typeof Page>[0],
parent: ResolvingMetadata
parent: ResolvingMetadata,
) {
const creator = await loader.getCreatorData(props.params.creatorSlug);

Expand Down Expand Up @@ -38,7 +38,7 @@ export default async function Page(props: {

return (
<>
<Creator creator={creator} projects={projects} />
<CreatorPage creator={creator} projects={projects} />
</>
);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { DocParser } from "app/(domains)/documents/DocParser";
import { MarkdownParser } from "app/(domains)/markdown/MarkdownParser";
import { loader } from "public/catalog/loader";
import { Project } from "../page-component";
import { ProjectPage } from "../pure";

export async function generateMetadata(props: Parameters<typeof Page>[0]) {
const creator = await loader.getCreatorData(props.params.creatorSlug);
const project = await loader.getProjectData(
props.params.creatorSlug,
props.params.projectSlug
props.params.projectSlug,
);

const fileContents = await loader.getProjectMarkdown(
props.params.creatorSlug,
props.params.projectSlug
props.params.projectSlug,
);

const doc = new DocParser({
Expand All @@ -23,7 +23,7 @@ export async function generateMetadata(props: Parameters<typeof Page>[0]) {
const title = `${doc.currentPage.title} - ${project.data.name} - ${creator.data?.name} - Fari Community`;

const currentPageTextContent = MarkdownParser.toPlainText(
doc.currentPage.content
doc.currentPage.content,
);
const description = currentPageTextContent.substring(0, 160) + "...";

Expand Down Expand Up @@ -58,12 +58,12 @@ export default async function Page(props: {
const creator = await loader.getCreatorData(props.params.creatorSlug);
const project = await loader.getProjectData(
props.params.creatorSlug,
props.params.projectSlug
props.params.projectSlug,
);

const fileContents = await loader.getProjectMarkdown(
props.params.creatorSlug,
props.params.projectSlug
props.params.projectSlug,
);

const doc = new DocParser({
Expand All @@ -77,7 +77,7 @@ export default async function Page(props: {

return (
<>
<Project creator={creator} project={project} doc={doc} />
<ProjectPage creator={creator} project={project} doc={doc} />
</>
);
}
Expand Down Expand Up @@ -106,7 +106,7 @@ export async function generateStaticParams() {
// handle default language
const fileContents = await loader.getProjectMarkdown(
creator.creatorSlug,
projectSlug
projectSlug,
);

const doc = new DocParser({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { DocParser } from "app/(domains)/documents/DocParser";
import { loader } from "public/catalog/loader";
import { Project } from "./page-component";
import { ProjectPage } from "./pure";

export async function generateMetadata(props: Parameters<typeof Page>[0]) {
const creator = await loader.getCreatorData(props.params.creatorSlug);
const project = await loader.getProjectData(
props.params.creatorSlug,
props.params.projectSlug
props.params.projectSlug,
);

const title = `${project.data.name} - ${creator.data?.name} - Fari Community`;
Expand Down Expand Up @@ -40,12 +40,12 @@ export default async function Page(props: {
const creator = await loader.getCreatorData(props.params.creatorSlug);
const project = await loader.getProjectData(
props.params.creatorSlug,
props.params.projectSlug
props.params.projectSlug,
);

const fileContents = await loader.getProjectMarkdown(
props.params.creatorSlug,
props.params.projectSlug
props.params.projectSlug,
);

const doc = new DocParser({
Expand All @@ -59,7 +59,7 @@ export default async function Page(props: {

return (
<>
<Project creator={creator} project={project} doc={doc} />
<ProjectPage creator={creator} project={project} doc={doc} />
</>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ import { FaHashtag } from "react-icons/fa";
import { IoMdDocument } from "react-icons/io";
import { per } from "../../../../../(domains)/style/per";

export function Project(props: {
export function ProjectPage(props: {
creator: ICreator;
project: IProject;
doc: IDoc;
Expand Down Expand Up @@ -101,7 +101,7 @@ export function Project(props: {
useEffect(() => {
const article = document.querySelector("article");
const headings = article?.querySelectorAll(
"h1,h2,h3,h4,h5,h6"
"h1,h2,h3,h4,h5,h6",
) as unknown as Array<HTMLElement>;

headings?.forEach((heading) => {
Expand Down Expand Up @@ -298,7 +298,7 @@ export function Project(props: {
<h1>
{
props.doc.pages.find(
(p) => p.id === props.doc.currentPage.id
(p) => p.id === props.doc.currentPage.id,
)?.title
}
</h1>
Expand Down Expand Up @@ -516,7 +516,7 @@ export function Project(props: {
)}
</Box>
);
}
},
)}
<Box>
{hasCategories && hasRootPages && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { ProjectCard } from "app/(components)/ProjectCard/ProjectCard";
import startCase from "lodash/startCase";
import { ICreator, IProject } from "public/catalog/loader";

export function Creator(props: {
export function CreatorPage(props: {
creator: ICreator;
projects: Array<IProject>;
}) {
Expand Down Expand Up @@ -58,7 +58,7 @@ export function Creator(props: {
</TagCloseButton>
</Tag>
);
}
},
)}
</Stack>
</Box>
Expand Down
Binary file modified bun.lockb
Binary file not shown.
3 changes: 0 additions & 3 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ const nextConfig = {
images: {
unoptimized: true,
},
experimental: {
appDir: true,
},
};

module.exports = nextConfig;
42 changes: 21 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "",
"main": "index.js",
"scripts": {
"dev": "next dev --turbo",
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
Expand All @@ -17,40 +17,40 @@
"prepare": "husky install"
},
"dependencies": {
"@chakra-ui/icons": "^2.0.19",
"@chakra-ui/icons": "^2.1.1",
"@chakra-ui/next-js": "^2.1.5",
"@chakra-ui/react": "^2.6.1",
"@emotion/css": "^11.11.0",
"@emotion/react": "^11.11.0",
"@chakra-ui/react": "^2.8.1",
"@emotion/css": "^11.11.2",
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@nikolovlazar/chakra-ui-prose": "^1.2.1",
"@types/node": "^20.1.2",
"@types/react": "^18.2.6",
"@types/react-dom": "^18.2.4",
"eslint": "^8.49.0",
"eslint-config-next": "^13.4.19",
"@types/node": "^20.8.2",
"@types/react": "^18.2.25",
"@types/react-dom": "^18.2.10",
"eslint": "^8.50.0",
"eslint-config-next": "^13.5.4",
"husky": "^8.0.3",
"lint-staged": "^14.0.1",
"lodash": "^4.17.21",
"netlify-cli": "^15.0.2",
"next": "13.4.1",
"prettier": "^2.8.8",
"netlify-cli": "^16.5.1",
"next": "13.5.4",
"prettier": "^3.0.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-icons": "^4.8.0",
"react-icons": "^4.11.0",
"remarkable": "^2.0.1",
"typescript": "5.0.4"
"typescript": "5.2.2"
},
"author": "",
"license": "ISC",
"lint-staged": {
"*.{js,ts,tsx}": "eslint --cache --fix",
"*.{js,css,md,ts,tsx,json}": "prettier --write"
"*.{js,ts,tsx}": "bunx eslint --cache --fix",
"*.{js,css,md,ts,tsx,json}": "bunx prettier --write"
},
"devDependencies": {
"@types/lodash": "^4.14.198",
"@types/remarkable": "^2.0.3",
"autoprefixer": "^10.4.14",
"postcss": "^8.4.23"
"@types/lodash": "^4.14.199",
"@types/remarkable": "^2.0.4",
"autoprefixer": "^10.4.16",
"postcss": "^8.4.31"
}
}
Loading

0 comments on commit 9eb1e00

Please sign in to comment.