Only allow search model to be updated without being subscribed

Do not make fetch request to server if user is not subscribed
This commit is contained in:
Debanjum Singh Solanky
2024-07-30 18:17:45 +05:30
parent f58cff5bcc
commit ecb873c488
2 changed files with 7 additions and 7 deletions

View File

@@ -13,6 +13,8 @@ export interface LocationData {
const locationFetcher = () => window.fetch("https://ipapi.co/json").then((res) => res.json()).catch((err) => console.log(err));
export const toTitleCase = (str: string) => str.replace(/\w\S*/g, (txt) => txt.charAt(0).toUpperCase() + txt.slice(1).toLowerCase());
export function welcomeConsole() {
console.log(`%c %s`, "font-family:monospace", `
__ __ __ __ ______ __ _____ __