mirror of
https://github.com/aljazceru/landscape-template.git
synced 2026-02-21 22:44:21 +01:00
Merge branch 'dev' into feature/list-your-product-ui
This commit is contained in:
@@ -37,7 +37,7 @@ export default function HackathonsPage() {
|
||||
<div className={`w-full`}>
|
||||
<div className="rounded-16 min-h-[280px] relative overflow-hidden p-16 md:p-24 flex flex-col items-start justify-end">
|
||||
<img
|
||||
className="w-full h-full object-cover object-top absolute top-0 left-0 z-[-2]"
|
||||
className="w-full h-full object-cover object-center absolute top-0 left-0 z-[-2]"
|
||||
src={bannerData.img}
|
||||
alt=""
|
||||
/>
|
||||
|
||||
@@ -39,7 +39,7 @@ export default function StoryCard({ story }: Props) {
|
||||
{story.cover_image && <img src={story.cover_image} className='h-[200px] w-full object-cover' alt="" />}
|
||||
<div className="p-24">
|
||||
<Header author={story.author} date={story.createdAt} />
|
||||
<Link to={createRoute({ type: 'story', id: story.id, title: story.title })}>
|
||||
<Link to={createRoute({ type: 'story', id: story.id, title: story.title, username: story.author.name })}>
|
||||
<h2 className="text-h5 font-bolder mt-16">{story.title}</h2>
|
||||
</Link>
|
||||
<p className="text-body4 text-gray-600 mt-8">{story.excerpt}...</p>
|
||||
|
||||
@@ -2,16 +2,17 @@ import { useState } from "react";
|
||||
import { Helmet } from "react-helmet";
|
||||
import { FiArrowLeft } from "react-icons/fi";
|
||||
import { useNavigate, useParams } from "react-router-dom";
|
||||
import BountyForm from "./Components/BountyForm/BountyForm";
|
||||
import QuestionForm from "./Components/QuestionForm/QuestionForm";
|
||||
// import BountyForm from "./Components/BountyForm/BountyForm";
|
||||
// import QuestionForm from "./Components/QuestionForm/QuestionForm";
|
||||
import CreateStoryPage from "./CreateStoryPage/CreateStoryPage";
|
||||
|
||||
interface Props {
|
||||
initType: 'story' | 'bounty' | 'question'
|
||||
}
|
||||
|
||||
export default function CreatePostPage() {
|
||||
export default function CreatePostPage(props: Props) {
|
||||
|
||||
const { type } = useParams()
|
||||
|
||||
const [postType] = useState<'story' | 'bounty' | 'question'>((type as any) ?? 'story');
|
||||
const [postType] = useState<'story' | 'bounty' | 'question'>(props.initType);
|
||||
|
||||
|
||||
const navigate = useNavigate();
|
||||
@@ -44,7 +45,7 @@ export default function CreatePostPage() {
|
||||
</h2> */}
|
||||
<CreateStoryPage />
|
||||
</>}
|
||||
{postType === 'bounty' && <>
|
||||
{/* {postType === 'bounty' && <>
|
||||
<h2 className="text-h2 font-bolder text-gray-800 mb-32">
|
||||
Write a Bounty
|
||||
</h2>
|
||||
@@ -55,7 +56,7 @@ export default function CreatePostPage() {
|
||||
Write a Question
|
||||
</h2>
|
||||
<QuestionForm />
|
||||
</>}
|
||||
</>} */}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -14,6 +14,7 @@ import { FaDiscord } from 'react-icons/fa'
|
||||
import { FiArrowRight } from 'react-icons/fi'
|
||||
import { capitalize } from 'src/utils/helperFunctions'
|
||||
import { bannerData } from 'src/features/Projects/pages/ExplorePage/Header/Header'
|
||||
import { PAGES_ROUTES } from 'src/utils/routing'
|
||||
|
||||
|
||||
export default function FeedPage() {
|
||||
@@ -46,6 +47,21 @@ export default function FeedPage() {
|
||||
<div
|
||||
className={`page-container`}
|
||||
>
|
||||
<div className="rounded-16 min-h-[280px] relative overflow-hidden p-16 md:p-24 flex flex-col items-start justify-end mb-24">
|
||||
<img
|
||||
className="w-full h-full object-cover object-center absolute top-0 left-0 z-[-2]"
|
||||
src={bannerData.img}
|
||||
alt=""
|
||||
/>
|
||||
<div className="w-full h-full object-cover bg-black bg-opacity-60 absolute top-0 left-0 z-[-1]"></div>
|
||||
<div className="max-w-[90%]">
|
||||
{bannerData.title}
|
||||
</div>
|
||||
|
||||
<Button href={bannerData.link.url} color="white" className="mt-24">
|
||||
{bannerData.link.content}
|
||||
</Button>
|
||||
</div>
|
||||
<div className={`w-full ${styles.grid}`}>
|
||||
<div id="title">
|
||||
{tagFilter && <p className="text-body6 text-gray-500 font-medium mb-8">
|
||||
@@ -76,7 +92,7 @@ export default function FeedPage() {
|
||||
<aside id='categories' className='no-scrollbar'>
|
||||
<div className="pb-16 md:overflow-y-scroll sticky-side-element">
|
||||
<Button
|
||||
href='/blog/create-post'
|
||||
href={PAGES_ROUTES.blog.writeStory}
|
||||
color='primary'
|
||||
fullWidth
|
||||
>
|
||||
|
||||
@@ -6,6 +6,7 @@ import VoteButton from "src/Components/VoteButton/VoteButton"
|
||||
import { Post } from "src/features/Posts/types"
|
||||
import { Vote_Item_Type } from "src/graphql"
|
||||
import { useVote } from "src/utils/hooks"
|
||||
import { PAGES_ROUTES } from "src/utils/routing"
|
||||
|
||||
interface Props {
|
||||
post: Pick<Post,
|
||||
@@ -40,7 +41,7 @@ export default function PostActions({ post, isPreview }: Props) {
|
||||
<button className={`
|
||||
hidden md:flex w-full aspect-square bg-white rounded-12 border-2 border-gray-200 justify-around items-center text-gray-500 hover:bg-gray-50 active:bg-gray-100
|
||||
`}
|
||||
onClick={() => isPreview ? navigate(-1) : navigate('/blog')}
|
||||
onClick={() => isPreview ? navigate(-1) : navigate(PAGES_ROUTES.blog.feed)}
|
||||
>
|
||||
<FiArrowLeft className={"text-body1"} />
|
||||
</button>
|
||||
|
||||
@@ -16,16 +16,22 @@ import { RotatingLines } from 'react-loader-spinner'
|
||||
|
||||
const CommentsSection = lazy(() => import( /* webpackChunkName: "comments_section" */ "src/features/Posts/Components/Comments"))
|
||||
|
||||
export default function PostDetailsPage() {
|
||||
const { type: _type, id } = useParams();
|
||||
const type = capitalize(_type);
|
||||
interface Props {
|
||||
postType: 'story' | 'bounty' | 'question'
|
||||
}
|
||||
|
||||
export default function PostDetailsPage(props: Props) {
|
||||
const { slug } = useParams();
|
||||
const type = capitalize(props.postType);
|
||||
|
||||
const id = Number(slug?.includes('--') ? slug.slice(slug.lastIndexOf('--') + 2) : slug)
|
||||
|
||||
const postDetailsQuery = usePostDetailsQuery({
|
||||
variables: {
|
||||
id: Number(id!),
|
||||
id,
|
||||
type: type as any
|
||||
},
|
||||
skip: isNaN(Number(id)),
|
||||
skip: isNaN(id),
|
||||
})
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user