-
Notifications
You must be signed in to change notification settings - Fork 531
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More custom elements for public tags (#1939)
* More custom elements for public tags Fixes #1935 * make URL from handle and not from tagUrl prop
- Loading branch information
Showing
8 changed files
with
99 additions
and
29 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
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
Binary file added
BIN
+2.03 KB
ui/shared/EntityTags/__screenshots__/EntityTag.pw.tsx_default_warpcast-tag-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,27 @@ | ||
import type { EntityTag } from './types'; | ||
|
||
// import { route } from 'nextjs-routes'; | ||
|
||
export function getTagLinkParams(data: EntityTag): { type: 'external' | 'internal'; href: string } | undefined { | ||
if (data.meta?.warpcastHandle) { | ||
return { | ||
type: 'external', | ||
href: `https://warpcast.com/${ data.meta.warpcastHandle }`, | ||
}; | ||
} | ||
|
||
if (data.meta?.tagUrl) { | ||
return { | ||
type: 'external', | ||
href: data.meta.tagUrl, | ||
}; | ||
} | ||
|
||
// Uncomment this block when "Tag search" page is ready - issue #1869 | ||
// if (data.tagType === 'generic' || data.tagType === 'protocol') { | ||
// return { | ||
// type: 'internal', | ||
// href: route({ pathname: '/' }), | ||
// }; | ||
// } | ||
} |