clean up
This commit is contained in:
@@ -6,14 +6,14 @@
|
|||||||
export interface Quote {
|
export interface Quote {
|
||||||
text: string;
|
text: string;
|
||||||
author: string;
|
author: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const businessQuotes: Quote[] = [
|
export const businessQuotes: Quote[] = [
|
||||||
// Steve Jobs quotes
|
// Steve Jobs quotes
|
||||||
{ text: "Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work.", author: "Steve Jobs" },
|
{ text: "Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work.", author: "Steve Jobs" },
|
||||||
{ text: "Innovation distinguishes between a leader and a follower.", author: "Steve Jobs" },
|
{ text: "Innovation distinguishes between a leader and a follower.", author: "Steve Jobs" },
|
||||||
{ text: "If you really look closely, most overnight successes took a long time.", author: "Steve Jobs" },
|
{ text: "If you really look closely, most overnight successes took a long time.", author: "Steve Jobs" },
|
||||||
|
|
||||||
// Entrepreneurs and CEOs
|
// Entrepreneurs and CEOs
|
||||||
{ text: "Your most unhappy customers are your greatest source of learning.", author: "Bill Gates" },
|
{ text: "Your most unhappy customers are your greatest source of learning.", author: "Bill Gates" },
|
||||||
{ text: "The way to get started is to quit talking and begin doing.", author: "Walt Disney" },
|
{ text: "The way to get started is to quit talking and begin doing.", author: "Walt Disney" },
|
||||||
@@ -23,65 +23,69 @@ export interface Quote {
|
|||||||
{ text: "Chase the vision, not the money; the money will end up following you.", author: "Tony Hsieh" },
|
{ text: "Chase the vision, not the money; the money will end up following you.", author: "Tony Hsieh" },
|
||||||
{ text: "It's not about ideas. It's about making ideas happen.", author: "Scott Belsky" },
|
{ text: "It's not about ideas. It's about making ideas happen.", author: "Scott Belsky" },
|
||||||
{ text: "If you do build a great experience, customers tell each other about that. Word of mouth is very powerful.", author: "Jeff Bezos" },
|
{ text: "If you do build a great experience, customers tell each other about that. Word of mouth is very powerful.", author: "Jeff Bezos" },
|
||||||
|
|
||||||
// Persistence and growth
|
// Persistence and growth
|
||||||
{ text: "The secret of getting ahead is getting started.", author: "Mark Twain" },
|
{ text: "The secret of getting ahead is getting started.", author: "Mark Twain" },
|
||||||
{ text: "Success is not final; failure is not fatal: It is the courage to continue that counts.", author: "Winston Churchill" },
|
{ text: "Success is not final; failure is not fatal: It is the courage to continue that counts.", author: "Winston Churchill" },
|
||||||
{ text: "Don't watch the clock; do what it does. Keep going.", author: "Sam Levenson" },
|
{ text: "Don't watch the clock; do what it does. Keep going.", author: "Sam Levenson" },
|
||||||
{ text: "The future belongs to those who believe in the beauty of their dreams.", author: "Eleanor Roosevelt" },
|
{ text: "The future belongs to those who believe in the beauty of their dreams.", author: "Eleanor Roosevelt" },
|
||||||
{ text: "If you can't fly, then run. If you can't run, then walk. If you can't walk, then crawl. But whatever you do, you have to keep moving forward.", author: "Martin Luther King Jr." },
|
{ text: "If you can't fly, then run. If you can't run, then walk. If you can't walk, then crawl. But whatever you do, you have to keep moving forward.", author: "Martin Luther King Jr." },
|
||||||
|
|
||||||
// Risk and innovation
|
// Risk and innovation
|
||||||
{ text: "The biggest risk is not taking any risk. In a world that's changing quickly, the only strategy that is guaranteed to fail is not taking risks.", author: "Mark Zuckerberg" },
|
{ text: "The biggest risk is not taking any risk. In a world that's changing quickly, the only strategy that is guaranteed to fail is not taking risks.", author: "Mark Zuckerberg" },
|
||||||
{ text: "I have not failed. I've just found 10,000 ways that won't work.", author: "Thomas Edison" },
|
{ text: "I have not failed. I've just found 10,000 ways that won't work.", author: "Thomas Edison" },
|
||||||
{ text: "What would you do if you weren't afraid?", author: "Sheryl Sandberg" },
|
{ text: "What would you do if you weren't afraid?", author: "Sheryl Sandberg" },
|
||||||
{ text: "When everything seems to be going against you, remember that the airplane takes off against the wind, not with it.", author: "Henry Ford" },
|
{ text: "When everything seems to be going against you, remember that the airplane takes off against the wind, not with it.", author: "Henry Ford" },
|
||||||
{ text: "If you're not embarrassed by the first version of your product, you've launched too late.", author: "Reid Hoffman" },
|
{ text: "If you're not embarrassed by the first version of your product, you've launched too late.", author: "Reid Hoffman" },
|
||||||
|
|
||||||
// Quality and execution
|
// Quality and execution
|
||||||
{ text: "The only place where success comes before work is in the dictionary.", author: "Vidal Sassoon" },
|
{ text: "The only place where success comes before work is in the dictionary.", author: "Vidal Sassoon" },
|
||||||
{ text: "Make every detail perfect and limit the number of details to perfect.", author: "Jack Dorsey" },
|
{ text: "Make every detail perfect and limit the number of details to perfect.", author: "Jack Dorsey" },
|
||||||
{ text: "There's no shortage of remarkable ideas, what's missing is the will to execute them.", author: "Seth Godin" },
|
{ text: "There's no shortage of remarkable ideas, what's missing is the will to execute them.", author: "Seth Godin" },
|
||||||
{ text: "Always deliver more than expected.", author: "Larry Page" },
|
{ text: "Always deliver more than expected.", author: "Larry Page" },
|
||||||
{ text: "Your reputation is more important than your paycheck, and your integrity is worth more than your career.", author: "Ryan Freitas" },
|
{ text: "Your reputation is more important than your paycheck, and your integrity is worth more than your career.", author: "Ryan Freitas" },
|
||||||
|
|
||||||
// Teamwork and determination
|
// Teamwork and determination
|
||||||
{ text: "No matter how brilliant your mind or strategy, if you're playing a solo game, you'll always lose out to a team.", author: "Reid Hoffman" },
|
{ text: "No matter how brilliant your mind or strategy, if you're playing a solo game, you'll always lose out to a team.", author: "Reid Hoffman" },
|
||||||
{ text: "If you want to achieve greatness stop asking for permission.", author: "Anonymous" },
|
{ text: "If you want to achieve greatness stop asking for permission.", author: "Anonymous" },
|
||||||
{ text: "Things work out best for those who make the best of how things work out.", author: "John Wooden" },
|
{ text: "Things work out best for those who make the best of how things work out.", author: "John Wooden" },
|
||||||
{ text: "The most valuable businesses of coming decades will be built by entrepreneurs who seek to empower people rather than try to make them obsolete.", author: "Peter Thiel" },
|
{ text: "The most valuable businesses of coming decades will be built by entrepreneurs who seek to empower people rather than try to make them obsolete.", author: "Peter Thiel" },
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
// For backward compatibility with existing code
|
||||||
* Returns a random business quote from the collection
|
export const quotes = businessQuotes;
|
||||||
*/
|
export default businessQuotes;
|
||||||
export function getRandomQuote(): Quote {
|
|
||||||
|
/**
|
||||||
|
* Returns a random business quote from the collection
|
||||||
|
*/
|
||||||
|
export function getRandomQuote(): Quote {
|
||||||
const randomIndex = Math.floor(Math.random() * businessQuotes.length);
|
const randomIndex = Math.floor(Math.random() * businessQuotes.length);
|
||||||
return businessQuotes[randomIndex];
|
return businessQuotes[randomIndex];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a random quote by a specific author if available,
|
* Returns a random quote by a specific author if available,
|
||||||
* otherwise returns a random quote from any author
|
* otherwise returns a random quote from any author
|
||||||
*/
|
*/
|
||||||
export function getRandomQuoteByAuthor(author: string): Quote {
|
export function getRandomQuoteByAuthor(author: string): Quote {
|
||||||
const authorQuotes = businessQuotes.filter(quote =>
|
const authorQuotes = businessQuotes.filter(quote =>
|
||||||
quote.author.toLowerCase() === author.toLowerCase()
|
quote.author.toLowerCase() === author.toLowerCase()
|
||||||
);
|
);
|
||||||
|
|
||||||
if (authorQuotes.length === 0) {
|
if (authorQuotes.length === 0) {
|
||||||
return getRandomQuote();
|
return getRandomQuote();
|
||||||
}
|
}
|
||||||
|
|
||||||
const randomIndex = Math.floor(Math.random() * authorQuotes.length);
|
const randomIndex = Math.floor(Math.random() * authorQuotes.length);
|
||||||
return authorQuotes[randomIndex];
|
return authorQuotes[randomIndex];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns quotes filtered by a theme or keyword in the text
|
* Returns quotes filtered by a theme or keyword in the text
|
||||||
*/
|
*/
|
||||||
export function getQuotesByTheme(keyword: string): Quote[] {
|
export function getQuotesByTheme(keyword: string): Quote[] {
|
||||||
return businessQuotes.filter(quote =>
|
return businessQuotes.filter(quote =>
|
||||||
quote.text.toLowerCase().includes(keyword.toLowerCase())
|
quote.text.toLowerCase().includes(keyword.toLowerCase())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -55,8 +55,6 @@ export async function clientFetch<T = any>(url: string, options: RequestInit = {
|
|||||||
// Normalize URL to ensure it uses the Next.js API proxy
|
// Normalize URL to ensure it uses the Next.js API proxy
|
||||||
const fullUrl = normalizeApiUrl(url);
|
const fullUrl = normalizeApiUrl(url);
|
||||||
|
|
||||||
console.log(`Fetching URL: ${fullUrl}`);
|
|
||||||
|
|
||||||
const res = await fetch(fullUrl, {
|
const res = await fetch(fullUrl, {
|
||||||
...options,
|
...options,
|
||||||
headers,
|
headers,
|
||||||
|
|||||||
@@ -37,8 +37,6 @@ export async function fetchServer<T = unknown>(
|
|||||||
// Get the complete backend URL using the utility function
|
// Get the complete backend URL using the utility function
|
||||||
const url = getServerApiUrl(endpoint);
|
const url = getServerApiUrl(endpoint);
|
||||||
|
|
||||||
console.log(`Making server request to: ${url}`);
|
|
||||||
|
|
||||||
// Make the request with proper auth headers
|
// Make the request with proper auth headers
|
||||||
const res = await fetch(url, {
|
const res = await fetch(url, {
|
||||||
...options,
|
...options,
|
||||||
|
|||||||
Reference in New Issue
Block a user