mirror of
https://github.com/plebbit/seedit.git
synced 2026-04-23 16:49:04 -04:00
fix(feed post): remove www in links
This commit is contained in:
@@ -125,7 +125,7 @@ const FeedPost: FC<FeedPostProps> = ({ post, index }) => {
|
||||
<a href={link} target='_blank' rel='noreferrer'>
|
||||
{(() => {
|
||||
try {
|
||||
return new URL(link).hostname;
|
||||
return new URL(link).hostname.replace(/^www\./, '') ;
|
||||
} catch (e) {
|
||||
return 'Invalid URL';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user