direct thought/story urls
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
|
import Link from 'next/link';
|
||||||
import { Story } from '@/data/creative';
|
import { Story } from '@/data/creative';
|
||||||
import { formatReadingTime } from '@/utils/readingTime';
|
import { formatReadingTime } from '@/utils/readingTime';
|
||||||
|
|
||||||
@@ -29,6 +30,12 @@ export default function ExpandableStory({ story }: ExpandableStoryProps) {
|
|||||||
<p className="text-gray-600 italic mb-4">{story.excerpt}</p>
|
<p className="text-gray-600 italic mb-4">{story.excerpt}</p>
|
||||||
|
|
||||||
<div className="flex gap-4 text-sm">
|
<div className="flex gap-4 text-sm">
|
||||||
|
<Link
|
||||||
|
href={`/stories/${story.id}`}
|
||||||
|
className="bg-yellow-200 text-black px-3 py-1 border-2 border-black font-bold hover:bg-yellow-300 transition-colors"
|
||||||
|
>
|
||||||
|
Read Full Story
|
||||||
|
</Link>
|
||||||
<span className="bg-yellow-200 text-black px-3 py-1 border-2 border-black font-bold">
|
<span className="bg-yellow-200 text-black px-3 py-1 border-2 border-black font-bold">
|
||||||
{formatReadingTime(story.readTime)} read
|
{formatReadingTime(story.readTime)} read
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
import Link from "next/link";
|
||||||
import { Thought } from "@/data/creative";
|
import { Thought } from "@/data/creative";
|
||||||
import { formatReadingTime } from "@/utils/readingTime";
|
import { formatReadingTime } from "@/utils/readingTime";
|
||||||
import Markdown from "react-markdown";
|
import Markdown from "react-markdown";
|
||||||
@@ -36,6 +37,12 @@ export default function ExpandableThought({ thought }: ExpandableThoughtProps) {
|
|||||||
<p className="text-gray-600 italic mb-4">{thought.excerpt}</p>
|
<p className="text-gray-600 italic mb-4">{thought.excerpt}</p>
|
||||||
|
|
||||||
<div className="flex gap-4 text-sm">
|
<div className="flex gap-4 text-sm">
|
||||||
|
<Link
|
||||||
|
href={`/thoughts/${thought.id}`}
|
||||||
|
className="bg-teal-200 text-black px-3 py-1 border-2 border-black font-bold hover:bg-teal-300 transition-colors"
|
||||||
|
>
|
||||||
|
Read Full Thought
|
||||||
|
</Link>
|
||||||
<span
|
<span
|
||||||
className={`${categoryColors[thought.category]} text-black px-3 py-1 border-2 border-black font-bold`}
|
className={`${categoryColors[thought.category]} text-black px-3 py-1 border-2 border-black font-bold`}
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user