Skip to content

Commit

Permalink
Merge pull request #10 from arshad-yaseen/chore/site-config
Browse files Browse the repository at this point in the history
chore: site config
  • Loading branch information
arshad-yaseen authored Nov 22, 2023
2 parents 7764ce0 + 0655b4c commit 36c1d15
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
5 changes: 3 additions & 2 deletions app/error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
import Link from "next/link"
import { TerminalIcon } from "lucide-react"

import { githubRepo } from "@/config/site"

import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"
import { Button } from "@/components/ui/button"
import { siteConfig } from "@/config/site"

export default function Error({
error,
Expand All @@ -25,7 +26,7 @@ export default function Error({
<div className="mt-5 flex items-center">
<Button variant="outline" asChild>
<Link
href={`${githubRepo}/issues/new?labels=runtime+error&title=${
href={`${siteConfig.links.github}/issues/new?labels=runtime+error&title=${
"Runtime: " + error.name
}&body=${error.message}`}
target="_blank"
Expand Down
7 changes: 4 additions & 3 deletions components/open-source.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
import React from "react"
import Link from "next/link"

import { githubRepo } from "@/config/site"

import { getRepo } from "@/lib/apiClient"

import { Icons } from "./icons"
import { siteConfig } from "@/config/site"

async function getStars() {
const repo = await getRepo("arshad-yaseen", "markdx")
Expand All @@ -33,7 +34,7 @@ function OpenSource() {
target="_blank"
rel="noreferrer"
className="underline underline-offset-4"
href={githubRepo}
href={siteConfig.links.github}
>
GitHub
</Link>
Expand All @@ -43,7 +44,7 @@ function OpenSource() {
target="_blank"
rel="noreferrer"
className="flex"
href={githubRepo}
href={siteConfig.links.github}
>
<div className="flex h-10 w-10 items-center justify-center space-x-2 rounded-md border border-muted bg-muted">
<Icons.gitHub className="h-5 w-5" />
Expand Down
4 changes: 2 additions & 2 deletions components/site-footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import React from "react"
import Link from "next/link"

import { githubRepo, siteConfig } from "@/config/site"
import { siteConfig } from "@/config/site"
import ModeToggle from "@/components/mode-toggle"

import SiteAssets from "./site-assets"
Expand Down Expand Up @@ -44,7 +44,7 @@ function SiteFooter() {
</Link>
. The source code is available on{" "}
<Link
href={githubRepo}
href={siteConfig.links.github}
target="_blank"
rel="noreferrer"
className="font-medium underline underline-offset-4"
Expand Down
5 changes: 3 additions & 2 deletions components/site-hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import Link from "next/link"
import { SparklesIcon } from "lucide-react"
import { Balancer } from "react-wrap-balancer"

import { githubRepo } from "@/config/site"


import { Icons } from "./icons"
import SiteAssets from "./site-assets"
import { Button } from "./ui/button"
import { siteConfig } from "@/config/site"

function SiteHero() {
return (
Expand Down Expand Up @@ -43,7 +44,7 @@ function SiteHero() {
Start writing for free
</Button>
</Link>
<Link href={githubRepo} target="_blank">
<Link href={siteConfig.links.github} target="_blank">
<Button variant="fancy" size="lg" className="sm:mt-12">
<Icons.gitHub className="mr-2 h-4 w-4" /> Github
</Button>
Expand Down
2 changes: 1 addition & 1 deletion config/site.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export type SiteConfig = typeof siteConfig;
export type SiteConfig = typeof siteConfig

export const siteConfig = {
name: "MarkDX - AI Markdown Editor",
Expand Down

1 comment on commit 36c1d15

@vercel
Copy link

@vercel vercel bot commented on 36c1d15 Nov 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.