186 lines
9.3 KiB
TypeScript
186 lines
9.3 KiB
TypeScript
export type BlogCategory = 'News' | 'Reviews' | 'Guides' | 'Repair';
|
||
|
||
export interface BlogArticle {
|
||
slug: string;
|
||
title: string;
|
||
excerpt: string;
|
||
author: string;
|
||
date: string;
|
||
readTime: string;
|
||
category: BlogCategory;
|
||
image: string;
|
||
body: string[];
|
||
}
|
||
|
||
export const BLOG_CATEGORIES: Array<'All' | BlogCategory> = [
|
||
'All',
|
||
'News',
|
||
'Reviews',
|
||
'Guides',
|
||
'Repair',
|
||
];
|
||
|
||
export const DEMO_BLOG_ARTICLES: BlogArticle[] = [
|
||
{
|
||
slug: 'iphone-screen-replacement-what-to-expect',
|
||
title: 'iPhone Screen Replacement: What To Expect Before You Book',
|
||
excerpt:
|
||
'From original vs compatible glass to turnaround time and warranty — a clear guide before you book a doorstep screen repair.',
|
||
author: 'iFixKart Staff',
|
||
date: '10 Sep 2026',
|
||
readTime: '5 min read',
|
||
category: 'Repair',
|
||
image:
|
||
'https://images.unsplash.com/photo-1511707171634-5f897ff02aa9?w=1200&auto=format&fit=crop&q=80',
|
||
body: [
|
||
'A cracked display is still the most common reason phones come into our workshop. Booking a screen replacement is straightforward, but a few details decide how the job turns out.',
|
||
'Ask whether the part is OEM or a high-grade compatible panel, and whether True Tone or Face ID will stay intact after the swap. On most recent iPhones those features can be preserved when the repair is done with the right parts and calibration.',
|
||
'Doorstep jobs usually finish in under 45 minutes when the part is in stock. You pay a small advance to lock the slot and the rest after you check the screen yourself.',
|
||
'Keep your invoice. iFixKart screen replacements include a limited warranty that covers manufacturing defects on the new part, not fresh drops or liquid damage.',
|
||
],
|
||
},
|
||
{
|
||
slug: 'how-we-test-refurbished-phones',
|
||
title: 'How We Test Refurbished Phones Before They Go On Sale',
|
||
excerpt:
|
||
'Every listed device is checked for display, battery, cameras, charging, and connectivity. Here is what that checklist actually includes.',
|
||
author: 'Quality Team',
|
||
date: '8 Sep 2026',
|
||
readTime: '6 min read',
|
||
category: 'Guides',
|
||
image:
|
||
'https://images.unsplash.com/photo-1580910051074-3eb694886505?w=1200&auto=format&fit=crop&q=80',
|
||
body: [
|
||
'Refurbished does not mean “used as-is”. Before a phone is listed on iFixKart it goes through a multi-point functional test.',
|
||
'We check the display for dead pixels and touch gaps, measure battery health, test cameras, speakers, microphones, charging, Wi-Fi, and cellular radios.',
|
||
'Failing parts are replaced with certified components. Light cosmetic marks may remain — we describe grade so you know what you are buying.',
|
||
'When the unit passes, it is packed with a warranty card and invoice. That is the same paperwork you need if you ever raise a claim.',
|
||
],
|
||
},
|
||
{
|
||
slug: 'best-budget-phones-under-20000',
|
||
title: 'Best Budget Phones Under ₹20,000 In India Right Now',
|
||
excerpt:
|
||
'A practical shortlist for everyday Android phones — battery, cameras, and software support without stretching the budget.',
|
||
author: 'Editorial',
|
||
date: '6 Sep 2026',
|
||
readTime: '7 min read',
|
||
category: 'News',
|
||
image:
|
||
'https://images.unsplash.com/photo-1511707171634-5f897ff02aa9?w=1200&auto=format&fit=crop&q=80',
|
||
body: [
|
||
'The sub-₹20,000 band is crowded. Most buyers want all-day battery, a clean software experience, and a camera that is usable in daylight.',
|
||
'Look at update policy as much as specs. Two years of OS upgrades matters more than an extra gigabyte of RAM you will not notice.',
|
||
'If you are buying refurbished, pick a slightly older flagship over a brand-new budget chipset — the camera and build are usually better, and our warranty still applies.',
|
||
'Compare listings on iFixKart with the original box, charger, and battery health called out on the product page.',
|
||
],
|
||
},
|
||
{
|
||
slug: 'when-to-replace-a-phone-battery',
|
||
title: 'When Should You Replace A Phone Battery?',
|
||
excerpt:
|
||
'If the phone dies by evening or shuts down at 20%, a battery swap is often cheaper than a new device. Here is how to decide.',
|
||
author: 'Repair Desk',
|
||
date: '3 Sep 2026',
|
||
readTime: '4 min read',
|
||
category: 'Repair',
|
||
image:
|
||
'https://images.unsplash.com/photo-1583863788434-e58a36330cf0?w=1200&auto=format&fit=crop&q=80',
|
||
body: [
|
||
'Lithium batteries wear with charge cycles. After 18–24 months many phones show shorter runtime and sudden shutdowns.',
|
||
'On iPhone, Settings → Battery → Battery Health is a useful first check. Under 80% is a common point to plan a replacement.',
|
||
'A genuine-grade battery restore is one of the highest-value repairs we do. It is faster than shopping for a new phone and keeps your data on the same device.',
|
||
'Book a slot, back up your photos, and we handle the swap on-site or at the workshop depending on the model.',
|
||
],
|
||
},
|
||
{
|
||
slug: 'refurbished-vs-new-phone-buying-guide',
|
||
title: 'Refurbished Vs New: Which Phone Should You Buy?',
|
||
excerpt:
|
||
'New is not always better value. Here is a simple way to choose between a fresh box and a certified refurbished unit.',
|
||
author: 'iFixKart Staff',
|
||
date: '1 Sep 2026',
|
||
readTime: '6 min read',
|
||
category: 'Guides',
|
||
image:
|
||
'https://images.unsplash.com/photo-1556656793-b724bb2c2b76?w=1200&auto=format&fit=crop&q=80',
|
||
body: [
|
||
'A new phone gives you the longest software window and a factory seal. A certified refurbished flagship from last year often matches the experience at a lower price.',
|
||
'Check three things: battery health, warranty length, and return window. If those are clear, refurbished is a strong buy for most people.',
|
||
'Skip grey-market “open box” deals with no invoice. Our listings include testing notes and a 6-month cover on smartphones.',
|
||
'If you need the latest camera or 5G modem, buy new. If you want value, start with refurbished and compare the same model year-on-year.',
|
||
],
|
||
},
|
||
{
|
||
slug: 'pixel-camera-tips-for-everyday-shots',
|
||
title: 'Google Pixel Camera Tips For Everyday Shots',
|
||
excerpt:
|
||
'Night Sight, Photo Unblur, and a few settings most people never open — small changes that make Pixel photos look cleaner.',
|
||
author: 'Editorial',
|
||
date: '28 Aug 2026',
|
||
readTime: '5 min read',
|
||
category: 'Guides',
|
||
image:
|
||
'https://images.unsplash.com/photo-1516035069371-29a1b244cc32?w=1200&auto=format&fit=crop&q=80',
|
||
body: [
|
||
'Pixel cameras are strong out of the box, but a couple of settings help in Indian lighting — harsh sun, mixed LEDs, and dim shops.',
|
||
'Use Night Sight when the scene is darker than a well-lit room. Hold still for a second; the stack does the rest.',
|
||
'Turn on Photo Unblur for moving kids or street shots. It is not magic, but it saves more frames than it ruins.',
|
||
'Keep the lenses clean. A microfibre cloth does more for Pixel shots than any third-party “HD” camera app.',
|
||
],
|
||
},
|
||
{
|
||
slug: 'samsung-galaxy-s-series-display-care',
|
||
title: 'Samsung Galaxy S Series: How To Keep The Display Safe',
|
||
excerpt:
|
||
'Curved and flat OLED panels both scratch. Here is practical care advice from our repair bench.',
|
||
author: 'Repair Desk',
|
||
date: '22 Aug 2026',
|
||
readTime: '4 min read',
|
||
category: 'Reviews',
|
||
image:
|
||
'https://images.unsplash.com/photo-1610945415295-d9bbf067e59c?w=1200&auto=format&fit=crop&q=80',
|
||
body: [
|
||
'Galaxy S phones look great until a pocket key leaves a hairline mark. OLED glass is still glass.',
|
||
'A well-fitted case and a genuine-grade tempered glass cost less than one screen replacement. We see that gap every week on the bench.',
|
||
'If the panel is already cracked, do not press on the black spots — that can spread damage to the OLED layers and raise the repair cost.',
|
||
'Book a replacement early if touch is failing. Same-day slots are easier when the part is common.',
|
||
],
|
||
},
|
||
{
|
||
slug: 'exchange-your-old-phone-checklist',
|
||
title: 'Exchange Your Old Phone: A 5-Minute Checklist',
|
||
excerpt:
|
||
'Sign out of iCloud and Google, back up photos, and reset — the steps that keep your exchange quote from dropping at pickup.',
|
||
author: 'Store Manager',
|
||
date: '18 Aug 2026',
|
||
readTime: '4 min read',
|
||
category: 'News',
|
||
image:
|
||
'https://images.unsplash.com/photo-1583394838336-acd977736f90?w=1200&auto=format&fit=crop&q=80',
|
||
body: [
|
||
'Exchange quotes assume the phone is unlocked and factory reset. Locked iCloud or Find My Device accounts delay pickup and can cancel the deal.',
|
||
'Back up first. Then sign out of Apple ID or Google, remove the SIM, and run a factory reset.',
|
||
'Be honest in the condition form. A cracked back that you marked as “good” will be revised on inspection.',
|
||
'Keep the original box if you have it. It is not mandatory, but it helps the process at drop-off.',
|
||
],
|
||
},
|
||
];
|
||
|
||
export function slugifyBlog(value: string): string {
|
||
return String(value || '')
|
||
.trim()
|
||
.toLowerCase()
|
||
.replace(/&/g, 'and')
|
||
.replace(/[^a-z0-9]+/g, '-')
|
||
.replace(/^-+|-+$/g, '');
|
||
}
|
||
|
||
export function findBlogArticle(
|
||
articles: BlogArticle[],
|
||
slug?: string | null
|
||
): BlogArticle | null {
|
||
if (!slug) return null;
|
||
const needle = slugifyBlog(slug);
|
||
return articles.find((a) => slugifyBlog(a.slug) === needle) || null;
|
||
}
|