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