Rename Action to SaveButton
This commit is contained in:
@@ -45,7 +45,7 @@ export function Default(props: Props) {
|
||||
<Header>
|
||||
<Avatar src={view.avatar} />
|
||||
<TitleAndByline title={view.displayName} creator={view.creator} />
|
||||
<Action view={view} pin />
|
||||
<SaveButton view={view} pin />
|
||||
</Header>
|
||||
<Description description={view.description} />
|
||||
<Likes count={view.likeCount || 0} />
|
||||
@@ -190,7 +190,7 @@ export function Likes({count}: {count: number}) {
|
||||
)
|
||||
}
|
||||
|
||||
export function Action({
|
||||
export function SaveButton({
|
||||
view,
|
||||
pin,
|
||||
}: {
|
||||
@@ -199,10 +199,10 @@ export function Action({
|
||||
}) {
|
||||
const {hasSession} = useSession()
|
||||
if (!hasSession) return null
|
||||
return <ActionInner view={view} pin={pin} />
|
||||
return <SaveButtonInner view={view} pin={pin} />
|
||||
}
|
||||
|
||||
function ActionInner({
|
||||
function SaveButtonInner({
|
||||
view,
|
||||
pin,
|
||||
}: {
|
||||
|
||||
@@ -8,7 +8,13 @@ import {sanitizeHandle} from 'lib/strings/handles'
|
||||
import {precacheList} from 'state/queries/feed'
|
||||
import {useTheme} from '#/alf'
|
||||
import {atoms as a} from '#/alf'
|
||||
import {Action, Avatar, Description, Header, Outer} from '#/components/FeedCard'
|
||||
import {
|
||||
Avatar,
|
||||
Description,
|
||||
Header,
|
||||
Outer,
|
||||
SaveButton,
|
||||
} from '#/components/FeedCard'
|
||||
import {Link as InternalLink, LinkProps} from '#/components/Link'
|
||||
import {Text} from '#/components/Typography'
|
||||
|
||||
@@ -18,12 +24,12 @@ import {Text} from '#/components/Typography'
|
||||
*/
|
||||
|
||||
export {
|
||||
Action,
|
||||
Avatar,
|
||||
AvatarPlaceholder,
|
||||
Description,
|
||||
Header,
|
||||
Outer,
|
||||
SaveButton,
|
||||
TitleAndBylinePlaceholder,
|
||||
} from '#/components/FeedCard'
|
||||
|
||||
@@ -48,7 +54,7 @@ export function Default(props: Props) {
|
||||
purpose={view.purpose}
|
||||
/>
|
||||
{showPinButton && view.purpose === CURATELIST && (
|
||||
<Action view={view} pin />
|
||||
<SaveButton view={view} pin />
|
||||
)}
|
||||
</Header>
|
||||
<Description description={view.description} />
|
||||
|
||||
Reference in New Issue
Block a user