Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
congle-engineer committed Oct 8, 2024
1 parent 7318b29 commit 7ddee8e
Show file tree
Hide file tree
Showing 12 changed files with 35 additions and 35 deletions.
6 changes: 3 additions & 3 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Footer } from "components/footer";
import { CMS_NAME, HOME_OG_IMAGE_URL } from "lib/constants";
import { Footer } from "../components/footer";
import { CMS_NAME, HOME_OG_IMAGE_URL } from "../lib/constants";
import type { Metadata } from "next";
import { Inter } from "next/font/google";
import cn from "classnames";
import { ThemeSwitcher } from "components/theme-switcher";
import { ThemeSwitcher } from "../components/theme-switcher";
import "./globals.css";

const inter = Inter({ subsets: ["latin"] });
Expand Down
10 changes: 5 additions & 5 deletions app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Container } from "components/container";
import { HeroPost } from "components/hero-post";
import { Intro } from "components/intro";
import { MoreStories } from "components/more-stories";
import { getAllPosts } from "lib/api";
import { Container } from "../components/container";
import { HeroPost } from "../components/hero-post";
import { Intro } from "../components/intro";
import { MoreStories } from "../components/more-stories";
import { getAllPosts } from "../lib/api";

export default function Page() {
const allPosts = getAllPosts();
Expand Down
14 changes: 7 additions & 7 deletions app/posts/[slug]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { Metadata } from "next";
import { notFound } from "next/navigation";
import { getAllPosts, getPostBySlug } from "lib/api";
import { getAllPosts, getPostBySlug } from "../../../lib/api";
// import { CMS_NAME } from "@/lib/constants";
import markdownToHtml from "lib/markdownToHtml";
import { Alert } from "components/alert";
import { Container } from "components/container";
import { Header } from "components/header";
import { PostBody } from "components/post-body";
import { PostHeader } from "components/post-header";
import markdownToHtml from "../../../lib/markdownToHtml";
import { Alert } from "../../../components/alert";
import { Container } from "../../../components/container";
import { Header } from "../../../components/header";
import { PostBody } from "../../../components/post-body";
import { PostHeader } from "../../../components/post-header";

type Params = {
params: {
Expand Down
2 changes: 1 addition & 1 deletion components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Container } from "components/container";
import { Container } from "./container";
// import { EXAMPLE_PATH } from "@/lib/constants";

export function Footer() {
Expand Down
2 changes: 1 addition & 1 deletion components/alert.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Container } from "components/container";
import { Container } from "./container";
// import { EXAMPLE_PATH } from "@/lib/constants";
import cn from "classnames";

Expand Down
10 changes: 5 additions & 5 deletions components/hero-post.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Avatar } from "components/avatar";
import { CoverImage } from "components/cover-image";
import { type Author } from "interfaces/author";
import { Avatar } from "./avatar";
import { CoverImage } from "./cover-image";
import { type Author } from "../interfaces/author";
import Link from "next/link";
import { DateFormatter } from "components/date-formatter";
import { DateFormatter } from "./date-formatter";

type Props = {
title: string;
Expand All @@ -29,7 +29,7 @@ export function HeroPost({
<div className="mb-20 md:mb-28 md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8">
<div>
<h3 className="mb-4 text-4xl leading-tight lg:text-5xl">
<Link href={`/data/${slug}`} className="hover:underline">
<Link href={`/posts/${slug}`} className="hover:underline">
{title}
</Link>
</h3>
Expand Down
2 changes: 1 addition & 1 deletion components/intro.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CMS_NAME } from "lib/constants";
import { CMS_NAME } from "../lib/constants";

export function Intro() {
return (
Expand Down
4 changes: 2 additions & 2 deletions components/more-stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Post } from "interfaces/post";
import { PostPreview } from "components/post-preview";
import { Post } from "../interfaces/post";
import { PostPreview } from "./post-preview";

type Props = {
posts: Post[];
Expand Down
2 changes: 1 addition & 1 deletion components/post-body.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import markdownStyles from "styles/markdown-style.module.css";
import markdownStyles from "../styles/markdown-style.module.css";

type Props = {
content: string;
Expand Down
10 changes: 5 additions & 5 deletions components/post-header.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Avatar } from "components/avatar";
import { CoverImage } from "components/cover-image";
import { DateFormatter } from "components/date-formatter";
import { PostTitle } from "components/post-title";
import { type Author } from "interfaces/author";
import { Avatar } from "./avatar";
import { CoverImage } from "./cover-image";
import { DateFormatter } from "./date-formatter";
import { PostTitle } from "./post-title";
import { type Author } from "../interfaces/author";

type Props = {
title: string;
Expand Down
6 changes: 3 additions & 3 deletions components/post-preview.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { type Author } from "interfaces/author";
import { type Author } from "../interfaces/author";
import Link from "next/link";
import { Avatar } from "components/avatar";
import { CoverImage } from "components/cover-image";
import { Avatar } from "./avatar";
import { CoverImage } from "./cover-image";
import { DateFormatter } from "./date-formatter";

type Props = {
Expand Down
2 changes: 1 addition & 1 deletion lib/api.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Post } from "interfaces/post";
import { Post } from "../interfaces/post";
import fs from "fs";
import matter from "gray-matter";
import { join } from "path";
Expand Down

0 comments on commit 7ddee8e

Please sign in to comment.