Skip to content

Commit 904fc82

Browse files
committed
fixed errors and project title
1 parent 71bc378 commit 904fc82

File tree

10 files changed

+6800
-3586
lines changed

10 files changed

+6800
-3586
lines changed

.netlify/functions-internal/server.js

+1,702-304
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.netlify/functions-internal/server.js.map

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/entry.server.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import type { EntryContext } from '@remix-run/node'
33
import { Response } from '@remix-run/node'
44
import { RemixServer } from '@remix-run/react'
55
import { isbot } from 'isbot'
6+
/* @ts-ignore */
67
import { renderToPipeableStream } from 'react-dom/server'
78
import { server } from './mocks/node'
89

app/routes/blog/$slug.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function Slug() {
4141
<div className="w-full lg:w-6/12">
4242
<div className="text-romanPrimary font-bold pt-10">{formatTime(data.article.created_at)}</div>
4343
<div className="flex items-center flex-wrap">
44-
{data.article.tags.map((tag) => <div key={tag} className="text-romanPrimary text-md mr-4">#{tag}</div>)}
44+
{data.article.tags.map((tag: string) => <div key={tag} className="text-romanPrimary text-md mr-4">#{tag}</div>)}
4545
</div>
4646
<div className="mt-20" dangerouslySetInnerHTML={{__html: data.article.body_html}}/>
4747
</div>

app/routes/blog/index.tsx

+9-3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ import {Link, useLoaderData} from "@remix-run/react";
66
import {json} from "@remix-run/node";
77
import { parseISO, format } from "date-fns";
88

9+
type Post = {
10+
id: string;
11+
title: string;
12+
created_at: string;
13+
tag_list: string[];
14+
}
15+
916
export const loader = async () => {
1017
const articles = await fetch(`https://dev.to/api/articles?username=romanbytes`).then((res) => res.json());
1118

@@ -23,15 +30,14 @@ export default function Blog() {
2330
const matches = useMatches();
2431
const currentRoute = matches[1];
2532

26-
console.log('POSTS', posts);
2733
return (
2834
<main className="container relative border-2 border-romanBlack lg:rounded-3xl bg-white pt-10 lg:pt-32 px-10 lg:px-28 pb-10 lg:pb-28 lg:my-28">
2935
<div className="hidden lg:block absolute top-10 left-0 right-0 text-center text-romanPrimary mb-16">{`~ ${currentRoute.pathname} `}</div>
3036
<RomanBytesLogo/>
3137
<h1 className="font-newMono text-romanBlack text-2xl font-bold hidden lg:hidden">Blog</h1>
3238

3339
<section className="mt-10 lg:mt-32">
34-
{posts.map((post) => (
40+
{posts.map((post: Post) => (
3541
<div key={post.id} className="relative w-full lg:w-1/2 max-w-[400] max-h-[225] min-w-[400] min-h-[225] border border-dashed border-romanText hover:border-solid hover:border-romanPrimary p-8 mt-[-1px] ml-0 lg:ml-[-1px]">
3642
<div className="lg:ml-16">{formatTime(post.created_at)}</div>
3743
<Link to={`/blog/${post.id}`}>
@@ -41,7 +47,7 @@ export default function Blog() {
4147
</h2>
4248
</Link>
4349
<div className="flex flex-wrap items-center lg:ml-16">
44-
{post.tag_list.map((tag) => <div key={tag} className="text-romanPrimary text-md mr-4">#{tag}</div>)}
50+
{post.tag_list.map((tag: string) => <div key={tag} className="text-romanPrimary text-md mr-4">#{tag}</div>)}
4551
</div>
4652
<Plus className="absolute top-[-3px] left-[-3px]" />
4753
<Plus className="absolute top-[-3px] right-[-3px]" />

app/routes/projects/index.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const getLangColors = async (langs: any): Promise<{ [key: string]: LangColorResu
3535
const colors: Colors = await fetch('https://raw.githubusercontent.com/ozh/github-colors/refs/heads/master/colors.json').then(res => res.json());
3636

3737
// Grab colors and return new array
38-
const langColors = langs.reduce((acc: { [key: string]: LangColorResult}, lang) => {
38+
const langColors = langs.reduce((acc: { [key: string]: LangColorResult}, lang: string) => {
3939
if (colors[lang]) {
4040
acc[lang] = {
4141
color: colors[lang].color,
@@ -58,7 +58,7 @@ export const loader = async () => {
5858
repo.topics.includes('portfolio')
5959
);
6060

61-
const setLangs = async (repo) => {
61+
const setLangs = async (repo: RepoData) => {
6262
const githubLangs = await fetch(repo.languages_url).then((response) => response.json());
6363
const setLangs:{[p: string]: LangColorResult} = await getLangColors(Object.keys(githubLangs));
6464
return setLangs;
@@ -199,7 +199,7 @@ export default function Projects() {
199199
<div className="container relative border-2 border-romanBlack lg:rounded-3xl bg-white px-10 pt-10 lg:pt-32 lg:px-28 pb-28 lg:my-28">
200200
<div className="hidden lg:block absolute top-10 left-0 right-0 text-center text-romanPrimary mb-16">{`~ ${currentRoute.pathname} `}</div>
201201
<RomanBytesLogo/>
202-
<h1 className="text-romanBlack font-newMono font-bold text-2xl hidden lg:block">Projects</h1>
202+
<h1 className="text-romanBlack font-newMono font-bold text-2xl lg:hidden">Projects</h1>
203203
<div className="flex flex-wrap mt-10 lg:mt-28 w-full lg:w-10/12">
204204
{repoCards}
205205
</div>
@@ -210,7 +210,7 @@ export default function Projects() {
210210

211211
return (
212212
<div className="container flex flex-col items-center justify-center">
213-
<h1 className="text-4xl text-white p-4 border-b border-white">
213+
<h1 className="lg:hidden text-4xl text-white p-4 border-b border-white">
214214
Projects
215215
</h1>
216216
<div className="flex flex-wrap p-4 xl:-mx-2 overflow-hidden lg:mt-4 text-white mb-20">

0 commit comments

Comments
 (0)