Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Na podstawie linka do artykułu lub/i tytułu bloga, określa czy jest podcastem, kanałem na YT czy zwykłym blogiem #89

Merged
merged 6 commits into from
Dec 31, 2020

Conversation

AdamSiekierski
Copy link
Member

Resolves #86

Na podstawie linku do artykułu lub/i tytułu bloga, określa czy jest podcastem, kanałem na YT czy zwykłym blogiem

image
image
image

@vercel
Copy link

vercel bot commented Dec 31, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/typeofweb/polskifrontend/1sjugfr9d
✅ Preview: https://polskifrontend-git-redirect-creator-type.typeofweb.vercel.app

components/ArticleSection/ArticleSection.tsx Outdated Show resolved Hide resolved
components/ArticleSection/ArticleSection.tsx Outdated Show resolved Hide resolved
components/ArticleSection/ArticleSection.tsx Outdated Show resolved Hide resolved
components/ArticleSection/ArticleSection.tsx Outdated Show resolved Hide resolved
import type { ArticlePageProps } from '../pages/artykuly/[slug]';

// Detect YouTube videos by the article URL
const ytRegex = /youtu(\.be|be\.com)\//g;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Po co /g?

utils/creator-utils.ts Outdated Show resolved Hide resolved
const ytRegex = /youtu(\.be|be\.com)\//g;

// Detect podcasts by the anchor.fm in article URL (most popular hosting) or podcast name (common words like talk or podcast)
const podcastRegex = /(anchor\.fm\/ | talk | podcast)/i;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Po co spacje?

utils/creator-utils.ts Show resolved Hide resolved
} else if (podcastRegex.exec(article.href) || podcastRegex.exec(article.blog.name)) {
return 'podcast';
} else {
return 'blog';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dodałbym as const do tych zwracanych wartości

Adam Siekierski added 2 commits December 31, 2020 20:43
@typeofweb typeofweb changed the title feat: Przejdź do artykułu/podcastu/filmu na stronie danego "artykułu" feat: Na podstawie linka do artykułu lub/i tytułu bloga, określa czy jest podcastem, kanałem na YT czy zwykłym blogiem Dec 31, 2020
@typeofweb typeofweb merged commit da465d2 into develop Dec 31, 2020
@typeofweb typeofweb deleted the redirect-creator-type branch December 31, 2020 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Pomysł] [Front] Przejdź do artykułu/podcastu/filmu
2 participants