-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implement infinite scroll posts
- Loading branch information
Showing
14 changed files
with
356 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import React from 'react' | ||
import Link from 'next/link' | ||
|
||
export type HashtagProps = { | ||
tag: string | ||
} | ||
|
||
export const Hashtag = ({ tag }: HashtagProps): JSX.Element => { | ||
return ( | ||
<Link | ||
href={`/tags/${tag}`} | ||
className="mr-1 text-sm text-core-secondary-300 hover:text-primary hover:underline" | ||
> | ||
#{tag} | ||
</Link> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import React, { ComponentProps, ReactNode } from 'react' | ||
|
||
import { cn } from '~/lib/utils' | ||
import { Button } from './ui/button' | ||
|
||
export type ReactionButtonProps = { | ||
count: number | ||
children: ReactNode | ||
direction?: string | ||
btnStyle?: string | ||
} & ComponentProps<'button'> | ||
|
||
export const ReactionButton = (props: ReactionButtonProps): JSX.Element => { | ||
const { count, children, direction = 'column', btnStyle } = props | ||
|
||
return ( | ||
<div | ||
className={cn( | ||
'inline-flex items-center text-xs text-core-secondary-300', | ||
direction === 'column' ? 'flex-col gap-y-1.5' : 'flex-row gap-x-1' | ||
)} | ||
> | ||
<Button | ||
type="button" | ||
size="icon" | ||
variant="secondary-outline" | ||
className={cn('h-[53px] w-[53px] rounded-full border-stroke-2 bg-section-1', btnStyle)} | ||
> | ||
{children} | ||
</Button> | ||
<span className="font-medium">{count}</span> | ||
</div> | ||
) | ||
} |
Oops, something went wrong.