From bcff470225c0e65f4ff2189fdd22d89a599fa87e Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Sat, 13 Aug 2022 23:32:07 +0400 Subject: [PATCH] Add "New" badge for new videos and guides --- components/links-list-item.tsx | 2 +- components/watch/video-grid-item.tsx | 6 +- content/guides.json | 56 +++++++-------- .../content/107-python-testing/102-nose.md | 2 - content/videos.json | 70 +++++++++---------- lib/guide.ts | 2 +- lib/video.ts | 2 +- pages/guides/index.tsx | 2 +- pages/index.tsx | 4 +- pages/watch/index.tsx | 3 +- 10 files changed, 72 insertions(+), 77 deletions(-) diff --git a/components/links-list-item.tsx b/components/links-list-item.tsx index 5577a09e1..22cf8e82a 100644 --- a/components/links-list-item.tsx +++ b/components/links-list-item.tsx @@ -49,7 +49,7 @@ export function LinksListItem(props: LinksListItemProps) { {icon} {title} {badgeText && - {badgeText}} + {badgeText}} {subtitle} diff --git a/components/watch/video-grid-item.tsx b/components/watch/video-grid-item.tsx index e2c82b444..1bf334e6a 100644 --- a/components/watch/video-grid-item.tsx +++ b/components/watch/video-grid-item.tsx @@ -7,7 +7,6 @@ type VideoGridItemProps = { date: string; target?: string; isNew?: boolean; - isPro?: boolean; colorIndex?: number; }; @@ -54,14 +53,13 @@ const bgColorList = [ ]; export function VideoGridItem(props: VideoGridItemProps) { - const { title, subtitle, date, isNew = false, isPro = false, colorIndex = 0, href, target } = props; + const { title, subtitle, date, isNew = false, colorIndex = 0, href, target } = props; return ( - {isNew && New} - {isPro && PRO} + {isNew && New} {date} {title} diff --git a/content/guides.json b/content/guides.json index 45a3d1b79..15881d357 100644 --- a/content/guides.json +++ b/content/guides.json @@ -3,7 +3,7 @@ "id": "avoid-render-blocking-javascript-with-async-defer", "title": "Async and Defer Script Loading", "description": "Learn how to avoid render blocking JavaScript using async and defer scripts.", - "isPro": false, + "isNew": false, "authorUsername": "kamranahmedse", "updatedAt": "2021-09-10T19:59:14.191Z", "createdAt": "2021-09-10T19:59:14.191Z" @@ -12,7 +12,7 @@ "id": "what-are-web-vitals", "title": "What are Web Vitals?", "description": "Learn what are the core web vitals and how to measure them.", - "isPro": false, + "isNew": false, "authorUsername": "kamranahmedse", "updatedAt": "2021-09-05T19:59:14.191Z", "createdAt": "2021-09-05T19:59:14.191Z" @@ -21,7 +21,7 @@ "id": "what-is-sli-slo-sla", "title": "SLIs, SLOs and SLAs", "description": "Learn what are different indicators for performance identification of any service.", - "isPro": false, + "isNew": false, "authorUsername": "kamranahmedse", "updatedAt": "2021-08-31T19:59:14.191Z", "createdAt": "2021-08-31T19:59:14.191Z" @@ -30,7 +30,7 @@ "id": "ci-cd", "title": "What is CI and CD?", "description": "Learn the basics of CI/CD and how to implement that with GitHub Actions.", - "isPro": false, + "isNew": false, "authorUsername": "kamranahmedse", "updatedAt": "2021-07-09T19:59:14.191Z", "createdAt": "2021-07-09T19:59:14.191Z" @@ -39,7 +39,7 @@ "id": "sso", "title": "SSO — Single Sign On", "description": "Learn the basics of SAML and understand how does Single Sign On work.", - "isPro": false, + "isNew": false, "authorUsername": "kamranahmedse", "updatedAt": "2021-07-01T19:59:14.191Z", "createdAt": "2021-07-01T19:59:14.191Z" @@ -48,7 +48,7 @@ "id": "oauth", "title": "OAuth — Open Authorization", "description": "Learn and understand what is OAuth and how it works", - "isPro": false, + "isNew": false, "authorUsername": "kamranahmedse", "updatedAt": "2021-06-28T19:59:14.191Z", "createdAt": "2021-06-28T19:59:14.191Z" @@ -57,7 +57,7 @@ "id": "jwt-authentication", "title": "JWT Authentication", "description": "Understand what is JWT authentication and how is it implemented", - "isPro": false, + "isNew": false, "authorUsername": "kamranahmedse", "updatedAt": "2021-06-20T19:59:14.191Z", "createdAt": "2021-06-20T19:59:14.191Z" @@ -66,7 +66,7 @@ "id": "token-authentication", "title": "Token Based Authentication", "description": "Understand what is token based authentication and how it is implemented", - "isPro": false, + "isNew": false, "authorUsername": "kamranahmedse", "updatedAt": "2021-06-02T20:59:14.191Z", "createdAt": "2021-06-02T20:59:14.191Z" @@ -75,7 +75,7 @@ "id": "session-authentication", "title": "Session Based Authentication", "description": "Understand what is session based authentication and how it is implemented", - "isPro": false, + "isNew": false, "authorUsername": "kamranahmedse", "updatedAt": "2021-05-26T20:59:14.191Z", "createdAt": "2021-05-26T20:59:14.191Z" @@ -84,7 +84,7 @@ "id": "basic-authentication", "title": "Basic Authentication", "description": "Understand what is basic authentication and how it is implemented", - "isPro": false, + "isNew": false, "authorUsername": "kamranahmedse", "updatedAt": "2021-05-19T20:59:14.191Z", "createdAt": "2021-05-19T20:59:14.191Z" @@ -93,7 +93,7 @@ "id": "character-encodings", "title": "Character Encodings", "description": "Covers the basics of character encodings and explains ASCII vs Unicode", - "isPro": false, + "isNew": false, "authorUsername": "kamranahmedse", "updatedAt": "2021-05-14T20:59:14.191Z", "createdAt": "2021-05-14T20:59:14.191Z" @@ -102,7 +102,7 @@ "id": "unfamiliar-codebase", "title": "Unfamiliar Codebase", "description": "Tips on getting getting familiar with an unfamiliar codebase", - "isPro": false, + "isNew": false, "authorUsername": "kamranahmedse", "updatedAt": "2021-05-04T20:59:14.191Z", "createdAt": "2021-05-04T20:59:14.191Z" @@ -111,7 +111,7 @@ "id": "why-build-it-and-they-will-come-wont-work-anymore", "title": "Build it and they will come?", "description": "Why “build it and they will come” alone won’t work anymore", - "isPro": false, + "isNew": false, "authorUsername": "spekulatius", "updatedAt": "2021-05-04T12:59:14.191Z", "createdAt": "2021-05-04T12:59:14.191Z" @@ -120,7 +120,7 @@ "id": "dhcp-in-one-picture", "title": "DHCP in One Picture", "description": "Here is what happens when a new device joins the network.", - "isPro": false, + "isNew": false, "authorUsername": "kamranahmedse", "updatedAt": "2021-04-28T15:48:21.191Z", "createdAt": "2021-04-28T15:48:21.191Z" @@ -129,7 +129,7 @@ "id": "ssl-tls-https-ssh", "title": "SSL vs TLS vs SSH", "description": "Quick tidbit on the differences between SSL, TLS, HTTPS and SSH", - "isPro": false, + "isNew": false, "authorUsername": "kamranahmedse", "updatedAt": "2021-04-22T15:48:21.191Z", "createdAt": "2021-04-22T15:48:21.191Z" @@ -138,7 +138,7 @@ "id": "asymptotic-notation", "title": "Asymptotic Notation", "description": "Learn the basics of measuring the time and space complexity of algorithms", - "isPro": false, + "isNew": false, "authorUsername": "kamranahmedse", "updatedAt": "2021-04-03T15:48:21.191Z", "createdAt": "2021-04-03T15:48:21.191Z" @@ -147,7 +147,7 @@ "id": "big-o-notation", "title": "Big-O Notation", "description": "Easy to understand explanation of Big-O notation without any fancy terms", - "isPro": false, + "isNew": false, "authorUsername": "kamranahmedse", "updatedAt": "2021-03-15T15:48:21.191Z", "createdAt": "2021-03-15T15:48:21.191Z" @@ -156,7 +156,7 @@ "id": "random-numbers", "title": "Random Numbers: Are they?", "description": "Learn how they are generated and why they may not be truly random.", - "isPro": false, + "isNew": false, "authorUsername": "kamranahmedse", "updatedAt": "2021-03-14T15:48:21.191Z", "createdAt": "2021-03-14T15:48:21.191Z" @@ -165,7 +165,7 @@ "id": "scaling-databases", "title": "Scaling Databases", "description": "Learn the ups and downs of different database scaling strategies", - "isPro": false, + "isNew": false, "authorUsername": "kamranahmedse", "updatedAt": "2021-02-18T15:48:21.191Z", "createdAt": "2021-02-18T15:48:21.191Z" @@ -174,7 +174,7 @@ "id": "what-is-internet", "title": "How does the internet work?", "description": "Learn the basics of internet and everything involved with this short video series", - "isPro": false, + "isNew": false, "authorUsername": "dmytrobol", "updatedAt": "2021-02-29T15:48:21.191Z", "createdAt": "2021-02-29T15:48:21.191Z" @@ -183,7 +183,7 @@ "id": "torrent-client", "title": "Building a BitTorrent Client", "description": "Learn everything you need to know about BitTorrent by writing a client in Go", - "isPro": false, + "isNew": false, "authorUsername": "jesse", "updatedAt": "2021-01-17T15:48:21.191Z", "createdAt": "2021-01-17T15:48:21.191Z", @@ -193,7 +193,7 @@ "id": "levels-of-seniority", "title": "Levels of Seniority", "description": "How to Step Up as a Junior, Mid Level or a Senior Developer?", - "isPro": false, + "isNew": false, "authorUsername": "kamranahmedse", "updatedAt": "2020-12-03T12:13:00.860Z", "createdAt": "2020-12-03T12:13:00.860Z" @@ -202,7 +202,7 @@ "id": "design-patterns-for-humans", "title": "Design Patterns for Humans", "description": "A language agnostic, ultra-simplified explanation to design patterns", - "isPro": false, + "isNew": false, "authorUsername": "kamranahmedse", "updatedAt": "2019-10-09T12:00:00.860Z", "createdAt": "2019-01-23T17:00:00.860Z" @@ -211,7 +211,7 @@ "id": "journey-to-http2", "title": "Journey to HTTP/2", "description": "The evolution of HTTP. How it all started and where we stand today", - "isPro": false, + "isNew": false, "authorUsername": "kamranahmedse", "createdAt": "2018-12-04T12:00:00.860Z", "updatedAt": "2018-12-04T12:00:00.860Z", @@ -221,7 +221,7 @@ "id": "dns-in-one-picture", "title": "DNS in One Picture", "description": "Quick illustrative guide on how a website is found on the internet.", - "isPro": false, + "isNew": false, "authorUsername": "kamranahmedse", "updatedAt": "2018-12-04T12:00:00.860Z", "createdAt": "2018-12-04T17:00:00.860Z" @@ -230,7 +230,7 @@ "id": "http-caching", "title": "HTTP Caching", "description": "Everything you need to know about web caching", - "isPro": false, + "isNew": false, "authorUsername": "kamranahmedse", "createdAt": "2018-11-29T17:00:00.860Z", "updatedAt": "2018-11-29T17:00:00.860Z" @@ -239,7 +239,7 @@ "id": "history-of-javascript", "title": "Brief History of JavaScript", "description": "How JavaScript was introduced and evolved over the years", - "isPro": false, + "isNew": false, "authorUsername": "kamranahmedse", "createdAt": "2017-10-28T17:00:00.860Z", "updatedAt": "2017-10-28T17:00:00.860Z" @@ -248,7 +248,7 @@ "id": "proxy-servers", "title": "Proxy Servers", "description": "How do proxy servers work and what are forward and reverse proxies?", - "isPro": false, + "isNew": false, "authorUsername": "ebrahimbharmal007", "createdAt": "2017-10-24T17:00:00.860Z", "updatedAt": "2017-10-24T17:00:00.860Z" diff --git a/content/roadmaps/107-python/content/107-python-testing/102-nose.md b/content/roadmaps/107-python/content/107-python-testing/102-nose.md index 7ec7dea26..4ee6060de 100644 --- a/content/roadmaps/107-python/content/107-python-testing/102-nose.md +++ b/content/roadmaps/107-python/content/107-python-testing/102-nose.md @@ -5,5 +5,3 @@ Nose is another opensource testing framework that extends `unittest` to provide Free Content Introduction to Nose Getting Started With Nose In Python - - diff --git a/content/videos.json b/content/videos.json index ad8ab64c6..929e2cadb 100644 --- a/content/videos.json +++ b/content/videos.json @@ -3,7 +3,7 @@ "id": "tree-data-structure", "title": "Tree Data Structure", "description": "Learn everything you need to know about the tree data structure", - "isPro": false, + "isNew": true, "youtubeLink": "https://www.youtube.com/watch?v=S2W3SXGPVyU", "authorUsername": "kamranahmedse", "duration": "8 minutes", @@ -14,7 +14,7 @@ "id": "hash-table-data-structure", "title": "Hash Table Data Structure", "description": "Learn everything you need to know about the hash table data structure", - "isPro": false, + "isNew": false, "youtubeLink": "https://www.youtube.com/watch?v=jalSiaIi8j4", "authorUsername": "kamranahmedse", "duration": "8 minutes", @@ -25,7 +25,7 @@ "id": "queue-data-structure", "title": "Queue Data Structure", "description": "Learn everything you need to know about the queue data structure", - "isPro": false, + "isNew": false, "youtubeLink": "https://www.youtube.com/watch?v=mDCi1lXd9hc", "authorUsername": "kamranahmedse", "duration": "4 minutes", @@ -36,7 +36,7 @@ "id": "stack-data-structure", "title": "Stack Data Structure", "description": "Learn everything you need to know about the stack data structure", - "isPro": false, + "isNew": false, "youtubeLink": "https://www.youtube.com/watch?v=I5lq6sCuABE", "authorUsername": "kamranahmedse", "duration": "5 minutes", @@ -47,7 +47,7 @@ "id": "linked-list-data-structure", "title": "Linked List Data Structure", "description": "Learn everything you need to know about linked list data structure", - "isPro": false, + "isNew": false, "youtubeLink": "https://www.youtube.com/watch?v=odW9FU8jPRQ", "authorUsername": "kamranahmedse", "duration": "11 minutes", @@ -58,7 +58,7 @@ "id": "array-structure", "title": "All about Array Data Structure", "description": "Learn everything you need to know about array data structure", - "isPro": false, + "isNew": false, "youtubeLink": "https://www.youtube.com/watch?v=QJNwK2uJyGs", "authorUsername": "kamranahmedse", "duration": "10 minutes", @@ -69,7 +69,7 @@ "id": "what-are-data-structures", "title": "What are Data Structures?", "description": "Learn about the different data structures in this illustrated series", - "isPro": false, + "isNew": false, "youtubeLink": "https://www.youtube.com/watch?v=9rhT3P1MDHk", "authorUsername": "kamranahmedse", "duration": "1 minute", @@ -80,7 +80,7 @@ "id": "what-is-eventual-consistency", "title": "What is Eventual Consistency?", "description": "Learn about the different consistency models in distributed systems", - "isPro": false, + "isNew": false, "youtubeLink": "https://www.youtube.com/watch?v=rpqsSkTIdAw", "authorUsername": "kamranahmedse", "duration": "5 minutes", @@ -91,7 +91,7 @@ "id": "ssh-ssl-tls", "title": "SSH vs TLS vs SSL", "description": "Learn the difference between SSH, TLS and SSL", - "isPro": false, + "isNew": false, "youtubeLink": "https://www.youtube.com/watch?v=k3rFFLmQCuY", "authorUsername": "kamranahmedse", "duration": "3 minutes", @@ -102,7 +102,7 @@ "id": "async-javascript", "title": "Asynchronous JavaScript", "description": "Learn how to write asynchronous JavaScript using Async/Await", - "isPro": false, + "isNew": false, "youtubeLink": "https://www.youtube.com/watch?v=VyIK6SV5f7o", "authorUsername": "kamranahmedse", "duration": "15 minutes", @@ -113,7 +113,7 @@ "id": "random-number-generators", "title": "Random Number Generators", "description": "How do random number generators work?", - "isPro": false, + "isNew": false, "youtubeLink": "https://www.youtube.com/watch?v=nDv3yXdD0rk", "authorUsername": "kamranahmedse", "duration": "8 minutes", @@ -124,7 +124,7 @@ "id": "big-o-notation", "title": "Big O Notation", "description": "Learn what the Big-O notation is and how to calculate the time complexity of an algorithm.", - "isPro": false, + "isNew": false, "youtubeLink": "https://www.youtube.com/watch?v=Z0bH0cMY0E8", "authorUsername": "kamranahmedse", "duration": "8 minutes", @@ -135,7 +135,7 @@ "id": "yaml-in-depth", "title": "YAML in Depth", "description": "Everything you need to know about YAML", - "isPro": false, + "isNew": false, "youtubeLink": "https://www.youtube.com/watch?v=ImHSpwUlNVc", "authorUsername": "kamranahmedse", "duration": "8 minutes", @@ -146,7 +146,7 @@ "id": "floating-point-arithmetic", "title": "Floating Point Arithmetic", "description": "Learn how ow the arithmetic operations work on floating-point numbers and why the results might be different from what you may expect.", - "isPro": false, + "isNew": false, "youtubeLink": "https://www.youtube.com/watch?v=RIiq4tTt6rI", "authorUsername": "kamranahmedse", "duration": "4 minutes", @@ -157,7 +157,7 @@ "id": "what-is-cap-theorem", "title": "What is CAP Theorem?", "description": "An illustrated explanation to CAP theorem with examples and proof.", - "isPro": false, + "isNew": false, "youtubeLink": "https://www.youtube.com/watch?v=_RbsFXWRZ10", "authorUsername": "kamranahmedse", "duration": "8 minutes", @@ -168,7 +168,7 @@ "id": "acid-explained", "title": "ACID Explained", "description": "Learn what it means for a database to be ACID compliant with examples.", - "isPro": false, + "isNew": false, "youtubeLink": "https://www.youtube.com/watch?v=yaQ5YMWkxq4", "authorUsername": "kamranahmedse", "duration": "5 minutes", @@ -179,7 +179,7 @@ "id": "transport-protocols-tcp-vs-udp", "title": "Transport Protocols: TCP vs UDP", "description": "Learn about the Transport Layer of the TCP/IP model and different transport protocols.", - "isPro": false, + "isNew": false, "youtubeLink": "https://www.youtube.com/watch?v=37AFBZv4_6Y", "authorUsername": "kamranahmedse", "duration": "10 minutes", @@ -190,7 +190,7 @@ "id": "tcp-ip-model", "title": "TCP/IP Model Explained", "description": "Learn what is TCP/IP Model and the different layers involved.", - "isPro": false, + "isNew": false, "authorUsername": "kamranahmedse", "youtubeLink": "https://www.youtube.com/watch?v=F5rni9fr1yE", "duration": "5 minutes", @@ -201,7 +201,7 @@ "id": "osi-model", "title": "OSI Model Explained", "description": "Learn what is OSI Model and the different layers involved.", - "isPro": false, + "isNew": false, "youtubeLink": "https://www.youtube.com/watch?v=dV8mjZd1OtU", "authorUsername": "kamranahmedse", "duration": "7 minutes", @@ -213,7 +213,7 @@ "title": "Freeze and Seal in JavaScript", "description": "Learn what is object freeze and seal in JavaScript and how to use them", "youtubeLink": "https://www.youtube.com/watch?v=O3uT2l6vgZ8", - "isPro": false, + "isNew": false, "authorUsername": "kamranahmedse", "duration": "6 minutes", "updatedAt": "2020-10-16T19:59:14.191Z", @@ -224,7 +224,7 @@ "title": "All about HTTP Caching", "description": "Learn what is HTTP caching, places for caching and different caching headers.", "youtubeLink": "https://www.youtube.com/watch?v=HiBDZgTNpXY", - "isPro": false, + "isNew": false, "authorUsername": "kamranahmedse", "duration": "13 minutes", "updatedAt": "2020-10-04T19:59:14.191Z", @@ -235,7 +235,7 @@ "title": "Content Delivery Networks", "description": "Learn what the CDNs are and the difference between push CDN vs pull CDN.", "youtubeLink": "https://www.youtube.com/watch?v=6DXEPcXKQNY", - "isPro": false, + "isNew": false, "authorUsername": "kamranahmedse", "duration": "4 minutes", "updatedAt": "2020-09-26T19:59:14.191Z", @@ -246,7 +246,7 @@ "title": "Load Balancers 101", "description": "Learn the basics of load balancers, types and different algorithms.", "youtubeLink": "https://www.youtube.com/watch?v=galcDRNd5Ow", - "isPro": false, + "isNew": false, "authorUsername": "kamranahmedse", "duration": "9 minutes", "updatedAt": "2020-09-18T19:59:14.191Z", @@ -257,7 +257,7 @@ "title": "DNS Records", "description": "Learn what the DNS is and how a website is found on the internet.", "youtubeLink": "https://www.youtube.com/watch?v=7lxgpKh_fRY", - "isPro": false, + "isNew": false, "authorUsername": "kamranahmedse", "duration": "6 minutes", "updatedAt": "2020-08-31T19:59:14.191Z", @@ -268,7 +268,7 @@ "title": "DNS and how does it work?", "description": "Learn what the DNS is and how a website is found on the internet.", "youtubeLink": "https://www.youtube.com/watch?v=Wj0od2ag5sk", - "isPro": false, + "isNew": false, "authorUsername": "kamranahmedse", "duration": "5 minutes", "updatedAt": "2020-08-17T19:59:14.191Z", @@ -279,7 +279,7 @@ "title": "System Design 101", "description": "Learn about all the bits and pieces of system design.", "youtubeLink": "https://www.youtube.com/watch?v=Y-Gl4HEyeUQ", - "isPro": false, + "isNew": false, "authorUsername": "kamranahmedse", "duration": "7 minutes", "updatedAt": "2020-08-08T19:59:14.191Z", @@ -290,7 +290,7 @@ "title": "JavaScript Fetch API", "description": "Learn how to use JavaScript's Fetch API to interact with remote API.", "youtubeLink": "https://www.youtube.com/watch?v=-ZI0ea5O2oA", - "isPro": false, + "isNew": false, "authorUsername": "kamranahmedse", "duration": "3 minutes", "updatedAt": "2020-08-02T19:59:14.191Z", @@ -301,7 +301,7 @@ "title": "Scaling the Unscalable", "description": "Learn the basics of System Design and understand how to build a scalable application.", "youtubeLink": "https://www.youtube.com/watch?v=a2rcgzludDU", - "isPro": false, + "isNew": false, "authorUsername": "kamranahmedse", "duration": "10 minutes", "updatedAt": "2020-07-26T19:59:14.191Z", @@ -312,7 +312,7 @@ "title": "All about Promises in JavaScript", "youtubeLink": "https://www.youtube.com/watch?v=BvrkobaCVVE", "description": "Learn how to write asynchronous code in JavaScript using promises.", - "isPro": false, + "isNew": false, "authorUsername": "kamranahmedse", "duration": "8 minutes", "updatedAt": "2020-07-20T19:59:14.191Z", @@ -323,7 +323,7 @@ "title": "Automate with GitHub Actions", "description": "Learn how to implement CI/CD with GitHub Actions", "youtubeLink": "https://www.youtube.com/watch?v=nyKZTKQS_EQ", - "isPro": false, + "isNew": false, "authorUsername": "kamranahmedse", "duration": "6 minutes", "updatedAt": "2020-07-13T19:59:14.191Z", @@ -334,7 +334,7 @@ "title": "What is Dependency Injection?", "description": "Learn what is dependency injection and how to write better code with the help of it.", "youtubeLink": "https://www.youtube.com/watch?v=0yc2UANSDiw", - "isPro": false, + "isNew": false, "authorUsername": "kamranahmedse", "duration": "3 minutes", "updatedAt": "2020-07-04T19:59:14.191Z", @@ -345,7 +345,7 @@ "title": "How to use CSS Variables?", "description": "Learn how to write scalable CSS using CSS Variables.", "youtubeLink": "https://www.youtube.com/watch?v=lgaxU7CRmxU", - "isPro": false, + "isNew": false, "authorUsername": "kamranahmedse", "duration": "5 minutes", "updatedAt": "2020-07-03T19:59:14.191Z", @@ -356,7 +356,7 @@ "title": "DOM, Shadow DOM, Virtual DOM", "description": "Learn what is DOM, Shadow DOM and Virtual DOM and how they work.", "youtubeLink": "https://www.youtube.com/watch?v=7Tok22qxPzQ", - "isPro": false, + "isNew": false, "authorUsername": "kamranahmedse", "duration": "6 minutes", "updatedAt": "2020-07-20T19:59:14.191Z", @@ -367,7 +367,7 @@ "title": "Practical Introduction to React", "description": "Learn how to create a React Application with practical example.", "youtubeLink": "https://www.youtube.com/watch?v=NyG7YJWJd6s&list=PLkZYeFmDuaN3NDLnBG01-sH2-nwn43mYu", - "isPro": false, + "isNew": false, "authorUsername": "kamranahmedse", "duration": "40 minutes", "updatedAt": "2020-07-09T19:59:14.191Z", @@ -378,7 +378,7 @@ "title": "Arrays and Objects in JavaScript", "description": "Learn how to manipulate arrays and objects in JavaScript.", "youtubeLink": "https://www.youtube.com/watch?v=n3NKGsM3iEw", - "isPro": false, + "isNew": false, "authorUsername": "kamranahmedse", "duration": "12 minutes", "updatedAt": "2020-05-09T19:59:14.191Z", diff --git a/lib/guide.ts b/lib/guide.ts index b4deb0376..c06f2755b 100644 --- a/lib/guide.ts +++ b/lib/guide.ts @@ -6,7 +6,7 @@ export type GuideType = { id: string; title: string; description: string; - isPro: boolean; + isNew: boolean; isDraft: boolean; createdAt: string; updatedAt: string; diff --git a/lib/video.ts b/lib/video.ts index c5bafc98e..4720e1907 100644 --- a/lib/video.ts +++ b/lib/video.ts @@ -7,7 +7,7 @@ export type VideoType = { title: string; description: string; youtubeLink?: string; - isPro: boolean; + isNew: boolean; duration: string; createdAt: string; updatedAt: string; diff --git a/pages/guides/index.tsx b/pages/guides/index.tsx index 58b6f10d2..ff17f2444 100644 --- a/pages/guides/index.tsx +++ b/pages/guides/index.tsx @@ -52,7 +52,7 @@ export default function Guides(props: GuidesProps) { href={`/guides/${oldGuide.id}`} key={oldGuide.id} title={oldGuide.title} - badgeText={oldGuide.isPro ? 'PRO' : ''} + badgeText={oldGuide.isNew ? 'NEW' : ''} subtitle={oldGuide.formattedUpdatedAt!} /> ))} diff --git a/pages/index.tsx b/pages/index.tsx index c49fece21..8212ed0f1 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -97,7 +97,7 @@ export default function Home(props: HomeProps) { target={'_blank'} key={video.id} href={video.youtubeLink!} - badgeText={video.isPro ? 'PRO' : ''} + badgeText={video.isNew ? 'NEW' : ''} hideSubtitleOnMobile title={video.title} subtitle={video.duration} @@ -132,7 +132,7 @@ export default function Home(props: HomeProps) { key={guide.id} href={`/guides/${guide.id}`} title={guide.title} - badgeText={guide.isPro ? 'PRO' : ''} + badgeText={guide.isNew ? 'NEW' : ''} subtitle={guide.formattedUpdatedAt!} /> ))} diff --git a/pages/watch/index.tsx b/pages/watch/index.tsx index 311ba6fdd..19da82e35 100644 --- a/pages/watch/index.tsx +++ b/pages/watch/index.tsx @@ -33,9 +33,8 @@ export default function Watch(props: VideosProps) { title={video.title} subtitle={video.description} date={video.formattedUpdatedAt!} - isNew={counter <= 1} colorIndex={counter} - isPro={video.isPro} + isNew={video.isNew} /> ))}