From 23362585f244aa0b1c793002be984f92eb35ed5b Mon Sep 17 00:00:00 2001 From: Tanner Gill Date: Sun, 25 Aug 2024 08:27:35 -0700 Subject: [PATCH 1/2] Removed singleQuote rule from prettier --- .prettierrc | 1 - 1 file changed, 1 deletion(-) diff --git a/.prettierrc b/.prettierrc index 5a3aa2a..2505772 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,6 +1,5 @@ { "semi": true, "trailingComma": "all", - "singleQuote": true, "useTabs": true } From cc3c00ea15d7bf89df3d55db1746e7dd15937223 Mon Sep 17 00:00:00 2001 From: Tanner Gill Date: Sun, 25 Aug 2024 08:27:55 -0700 Subject: [PATCH 2/2] Ran prettier across codebase --- .github/workflows/update-deps.yml | 2 +- "ORIENTACI\303\223N-es.md" | 1 - firebase.json | 24 +++---- index.html | 2 +- .../complete-take-home-assignment.md | 2 +- learning-modules/pair-interview-practice.md | 7 +- .../resources/job-fit-interview-questions.md | 4 +- .../resources/mock-job-description.md | 49 +++++++------- ...guntas-para-entrevistas-de-fit-cultural.md | 2 + .../resources/technical-interview-rubric.md | 10 ++- .../what-to-ask-your-interviewers.md | 1 - .../what-to-include-on-linkedin-spanish.md | 11 ++-- .../what-to-include-on-linkedin.md | 4 +- src/App.jsx | 10 +-- src/api/config.js | 10 +-- src/api/firebase.js | 24 +++---- src/api/index.js | 4 +- src/api/useAuth.jsx | 8 +-- src/components/ListItem.jsx | 2 +- src/components/SingleList.jsx | 2 +- src/components/index.js | 4 +- src/index.jsx | 10 +-- src/utils/hooks.js | 2 +- src/utils/index.js | 4 +- src/views/Home.jsx | 4 +- src/views/Layout.jsx | 6 +- src/views/List.jsx | 2 +- src/views/index.js | 8 +-- tests/App.test.jsx | 6 +- tests/setup.js | 2 +- vite.config.js | 64 +++++++++---------- 31 files changed, 144 insertions(+), 147 deletions(-) diff --git a/.github/workflows/update-deps.yml b/.github/workflows/update-deps.yml index fd74d40..c39eda5 100644 --- a/.github/workflows/update-deps.yml +++ b/.github/workflows/update-deps.yml @@ -12,6 +12,6 @@ jobs: - run: rm -rf .github/ - uses: EndBug/add-and-commit@latest with: - add: '.' + add: "." message: 'Update dependencies with "npm update"' push: true diff --git "a/ORIENTACI\303\223N-es.md" "b/ORIENTACI\303\223N-es.md" index 79ba740..9e7594d 100644 --- "a/ORIENTACI\303\223N-es.md" +++ "b/ORIENTACI\303\223N-es.md" @@ -2,7 +2,6 @@ ⚠️ **Este documento contiene información desactualizada** ⚠️ - ## ¿Qué es The Collab Lab? The Collab Lab existe para ayudar a ingenierxs recien empezando sus careras ganar experiencia trabajando colaborativamente con otrxs en un equipo de desarollo de software. Trabajamos remotamente en proyectos reales con otrxs ingenierxs recien empezando sus careras. diff --git a/firebase.json b/firebase.json index 340ed5b..f56028c 100644 --- a/firebase.json +++ b/firebase.json @@ -1,16 +1,12 @@ { - "hosting": { - "public": "build", - "ignore": [ - "firebase.json", - "**/.*", - "**/node_modules/**" - ], - "rewrites": [ - { - "source": "**", - "destination": "/index.html" - } - ] - } + "hosting": { + "public": "build", + "ignore": ["firebase.json", "**/.*", "**/node_modules/**"], + "rewrites": [ + { + "source": "**", + "destination": "/index.html" + } + ] + } } diff --git a/index.html b/index.html index 5016fc3..d7dce38 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,4 @@ - + diff --git a/learning-modules/complete-take-home-assignment.md b/learning-modules/complete-take-home-assignment.md index a0274ab..045931b 100644 --- a/learning-modules/complete-take-home-assignment.md +++ b/learning-modules/complete-take-home-assignment.md @@ -3,6 +3,6 @@ During the final week of Collab Lab, participants will complete the following take-home assignment: [https://github.com/the-collab-lab/career-lab-challenge-next](https://github.com/the-collab-lab/career-lab-challenge-next) -Once the assignment is complete, send a link of your completed challenge to the mentor that is conducting your technical interview. +Once the assignment is complete, send a link of your completed challenge to the mentor that is conducting your technical interview. Find your mentor/technical interviewer here: [Sync: Technical mock interview](mock-interview-technical.md) diff --git a/learning-modules/pair-interview-practice.md b/learning-modules/pair-interview-practice.md index 97869cb..fd0996a 100644 --- a/learning-modules/pair-interview-practice.md +++ b/learning-modules/pair-interview-practice.md @@ -4,11 +4,10 @@ Reach out to the partner you are paired with below, schedule a meeting, and work through the questions listed in the pages below so that you can each feel more confident navigating the technical and job-fit interviews! -* [Job fit interview questions](../resources/job-fit-interview-questions.md) -* [Technical interview questions](../resources/technical-interview-questions.md) +- [Job fit interview questions](../resources/job-fit-interview-questions.md) +- [Technical interview questions](../resources/technical-interview-questions.md) If you have questions or comments, please don't hesitate to reach out in your cohort Slack channel! - | Collabie | Collabie | Collabie | -| ---- | ---- | ---- | +| -------- | -------- | -------- | diff --git a/learning-modules/resources/job-fit-interview-questions.md b/learning-modules/resources/job-fit-interview-questions.md index 173d08e..ad86954 100644 --- a/learning-modules/resources/job-fit-interview-questions.md +++ b/learning-modules/resources/job-fit-interview-questions.md @@ -19,5 +19,5 @@ The following are suggested questions for the job fit mock interview: - What questions do you have for me? What would you like to know about the role, the company, etc.? - Two good final questions: - - What do you think would be the biggest challenge for you in this role? - - What is the biggest strength you think you’d bring to the role? + - What do you think would be the biggest challenge for you in this role? + - What is the biggest strength you think you’d bring to the role? diff --git a/learning-modules/resources/mock-job-description.md b/learning-modules/resources/mock-job-description.md index 34adadd..cde65ea 100644 --- a/learning-modules/resources/mock-job-description.md +++ b/learning-modules/resources/mock-job-description.md @@ -4,18 +4,18 @@ We're looking for a Software Engineer to join our App Improvement team at Zapier We know applying for and taking on a new job at any company requires a leap of faith. We want you to feel comfortable and excited to apply at Zapier. To help share a bit more about life at Zapier, here are a few resources in addition to the job description that can give you an inside look at what life is like at Zapier. We hope you'll take the leap of faith and apply. -* [Our Commitment to Applicants](https://workable.com/nr?l=https%3A%2F%2Fzapier.com%2Fjobs%2Four-commitment-to-applicants%2F) -* [Culture and Values at Zapier](https://workable.com/nr?l=https%3A%2F%2Fzapier.com%2Fjobs%2Fculture-and-values-at-zapier%2F) -* [Zapier Guide to Remote Work](https://workable.com/nr?l=https%3A%2F%2Fzapier.com%2Flearn%2Fthe-ultimate-guide-to-remote-working%2F) -* [Zapier Code of Conduct](https://workable.com/nr?l=https%3A%2F%2Fzapier.com%2Fjobs%2Fzapier-code-of-conduct%2F) -* [Diversity and Inclusivity at Zapier](https://workable.com/nr?l=https%3A%2F%2Fzapier.com%2Fjobs%2Fworking-on-diversity-and-inclusivity%2F) +- [Our Commitment to Applicants](https://workable.com/nr?l=https%3A%2F%2Fzapier.com%2Fjobs%2Four-commitment-to-applicants%2F) +- [Culture and Values at Zapier](https://workable.com/nr?l=https%3A%2F%2Fzapier.com%2Fjobs%2Fculture-and-values-at-zapier%2F) +- [Zapier Guide to Remote Work](https://workable.com/nr?l=https%3A%2F%2Fzapier.com%2Flearn%2Fthe-ultimate-guide-to-remote-working%2F) +- [Zapier Code of Conduct](https://workable.com/nr?l=https%3A%2F%2Fzapier.com%2Fjobs%2Fzapier-code-of-conduct%2F) +- [Diversity and Inclusivity at Zapier](https://workable.com/nr?l=https%3A%2F%2Fzapier.com%2Fjobs%2Fworking-on-diversity-and-inclusivity%2F) _Zapier is proud to be an equal opportunity workplace dedicated to pursuing and hiring a diverse workforce._ Even though our job description may seem like we're looking for a specific candidate, the role inevitably ends up tailored to the person who applies and joins. Regardless of how well you feel you fit our description, we encourage you to apply if you meet these criteria: You love collaborating with teammates to understand and address their data needs and help them become more effective. -# Requirements +# Requirements ## About You @@ -35,13 +35,13 @@ You love collaborating with teammates to understand and address their data needs Zapier is a small, fast-growing, and remote-first company, so you'll likely get experience on many different projects across the organization. That said, here are some things you'll probably do: -* Build and maintain Apps on the Zapier platform for crucial APIs -* Migrate applications to new APIs as the need arises -* Talk to partner engineers about changes to APIs and impacts that might have on Zapier customers -* Help the team build tooling to help other app developers and help Zapier scale to 1000s of developers using the Zapier platform -* Help other engineers on the team and across Zapier -* As a part of Zapier's all-hands philosophy, help customers via support to ensure they have the best experience possible. -* Experiment: this is a startup so everything can change as we experiment with doing more custom partnership work +- Build and maintain Apps on the Zapier platform for crucial APIs +- Migrate applications to new APIs as the need arises +- Talk to partner engineers about changes to APIs and impacts that might have on Zapier customers +- Help the team build tooling to help other app developers and help Zapier scale to 1000s of developers using the Zapier platform +- Help other engineers on the team and across Zapier +- As a part of Zapier's all-hands philosophy, help customers via support to ensure they have the best experience possible. +- Experiment: this is a startup so everything can change as we experiment with doing more custom partnership work ## How To Apply @@ -63,7 +63,6 @@ We believe in small teams. Small teams are fast and nimble. Small groups mean le We believe in a safe, welcoming, and inclusive environment. All teammates at Zapier agree to a code of conduct. - ## The Whole Package Location: Planet Earth. @@ -72,18 +71,18 @@ If you want to work remote, that's great. If you want to work near others, that' ### Compensation: -* Competitive salary (we don't use remote as an excuse to pay less) -* Great healthcare + dental + vision coverage* -* Retirement plan with 4% company match* -* Profit sharing -* 2 annual company retreats to awesome places -* 14 weeks paid leave for new parents of biological or adopted children -* Pick your own equipment. We'll set you up with whatever Apple laptop + monitor combo you want plus any software you need. -* Unlimited vacation policy. Plus we require you to take at least 2 weeks off each year. We see most employees take 4-5 weeks off per year. This isn't a vague policy where unlimited vacation means no vacation. -* Work with awesome companies around the world. We partner with great software companies all over the world and you'll constantly get to interact with people from these great companies +- Competitive salary (we don't use remote as an excuse to pay less) +- Great healthcare + dental + vision coverage\* +- Retirement plan with 4% company match\* +- Profit sharing +- 2 annual company retreats to awesome places +- 14 weeks paid leave for new parents of biological or adopted children +- Pick your own equipment. We'll set you up with whatever Apple laptop + monitor combo you want plus any software you need. +- Unlimited vacation policy. Plus we require you to take at least 2 weeks off each year. We see most employees take 4-5 weeks off per year. This isn't a vague policy where unlimited vacation means no vacation. +- Work with awesome companies around the world. We partner with great software companies all over the world and you'll constantly get to interact with people from these great companies -*While we take care of our international folks as best we can, currently, healthcare and retirement plans are only available to US-based employees. +\*While we take care of our international folks as best we can, currently, healthcare and retirement plans are only available to US-based employees. _Optional: Share anonymously some demographic information about yourself to help us better track trends related to the backgrounds of candidates interested in working at Zapier in order for us to build a team that represents the users at Zapier and the broader world population._ -_Zapier is an equal opportunity employer. We're excited to work with talented and empathetic people no matter their race, color, gender, sexual orientation, religion, national origin, physical or mental disability, or age. Our code of conduct provides a beacon for the kind of company we strive to be, and we celebrate our differences because those differences are what allow us to make a product that serves a global user base._ \ No newline at end of file +_Zapier is an equal opportunity employer. We're excited to work with talented and empathetic people no matter their race, color, gender, sexual orientation, religion, national origin, physical or mental disability, or age. Our code of conduct provides a beacon for the kind of company we strive to be, and we celebrate our differences because those differences are what allow us to make a product that serves a global user base._ diff --git a/learning-modules/resources/preguntas-para-entrevistas-de-fit-cultural.md b/learning-modules/resources/preguntas-para-entrevistas-de-fit-cultural.md index e69be51..c54f225 100644 --- a/learning-modules/resources/preguntas-para-entrevistas-de-fit-cultural.md +++ b/learning-modules/resources/preguntas-para-entrevistas-de-fit-cultural.md @@ -1,7 +1,9 @@ # Preguntas para entrevistas de fit cultural + ​ Las siguientes preguntas son sugeridas para entrevistas de fit cultural: ​ + - Cuentame acerca de como empezaste con Desarrollo web. - Qué estás buscando para tu nueva oportunidad de trabajo? - Qué estás buscando en un equipo? diff --git a/learning-modules/resources/technical-interview-rubric.md b/learning-modules/resources/technical-interview-rubric.md index 305e2aa..455b6f5 100644 --- a/learning-modules/resources/technical-interview-rubric.md +++ b/learning-modules/resources/technical-interview-rubric.md @@ -1,4 +1,5 @@ ## Accessibility + ### 1. What are some of the tools you can use to test the accessibility of a web page or web application? @@ -25,6 +26,7 @@
### 2. How is the `alt` attribute on an `img` element used? + @@ -49,6 +51,7 @@
### 3. When should you use a link versus a button? + @@ -67,6 +70,7 @@
### 4. What are the advantages for accessibility of using em or rem as a CSS unit versus px? + @@ -85,6 +89,7 @@
### 5. What are ARIA attributes and how are they useful? + @@ -109,6 +114,7 @@
### 6. Why is color alone insufficient to to convey information in a UI? + @@ -127,6 +133,7 @@
## React + ### 1. What are `state` and `props` in React? How are they best used? @@ -154,10 +161,9 @@
- ### 2. What are “stateless” components in React? How are they useful? -Note 1: This question is a natural extension of the purpose of `state`. If the discussion in question 1 covers it, feel free to skip. +Note 1: This question is a natural extension of the purpose of `state`. If the discussion in question 1 covers it, feel free to skip. Note 2: candidate may not have heard this term before, or may also know it as a 'presentational component' You can define it for them, e.g. 'A component that has no state.' diff --git a/learning-modules/what-to-ask-your-interviewers.md b/learning-modules/what-to-ask-your-interviewers.md index 2311bf4..0ebebc5 100644 --- a/learning-modules/what-to-ask-your-interviewers.md +++ b/learning-modules/what-to-ask-your-interviewers.md @@ -21,4 +21,3 @@ Reflect on positive and negative experiences that you’ve had in previous jobs. What do you want to know to help you make an informed decision about whether you want to work at this place? These questions typically revolve around the team, your manager, the product or service, and the company itself. > **Note:** It is totally valid to want to know things like the salary range, the company’s time off policy, how health and other benefits work, etc. Those questions are better suited for a recruiter or HR/people operations representative than a hiring manager or fellow developer. - diff --git a/learning-modules/what-to-include-on-linkedin-spanish.md b/learning-modules/what-to-include-on-linkedin-spanish.md index cab36c0..f61fa5f 100644 --- a/learning-modules/what-to-include-on-linkedin-spanish.md +++ b/learning-modules/what-to-include-on-linkedin-spanish.md @@ -80,7 +80,7 @@ Es la sección más importante o una de las secciones más importantes de Linked 1. **[0:50]** Mala experiencia #1: Solo se pone la posición, pero no se incluye información sobre lo que hizo en dicha posición. Esto no ayuda a las personas que revisan perfiles a poder entender qué hicieron en esa posición, ya que por ejemplo un "Technical Solutions Consultant" puede significar una cosa para una empresa, y una cosa diferente para otra empresa, por lo que puede hacer que el recruiter decida no tener en cuenta el perfil. 2. **[1:40]** Mala experiencia #2: Hay más información sobre la posición, pero no se entiende ya que el inglés que se está usando es muy complejo. No quieres que no lo entienda un reclutador o la persona que está revisando tu perfil. -3. **[2:40]** Buena experiencia #1: Importante que lo pueda entender un reclutador o un hiring manager. +3. **[2:40]** Buena experiencia #1: Importante que lo pueda entender un reclutador o un hiring manager. - **[4:20]** Escoger un título acorde a la experiencia o al rol que se quiera ejecutar (e.g. Full-stack developer). El título se usa como palabras clave cuando buscan perfiles en LinkedIn. - **[4:48]** Usar bullet points para mostrar los logros y/o fortalezas conseguidas en cada posición. - **[4:58]** Usar un inglés más simple, claro y directo al grano. (ej "Led the Code Connector community and organize the largest tech meetups in Memphis"). @@ -109,7 +109,6 @@ Es la sección más importante o una de las secciones más importantes de Linked - **[11:22]** No tiene que ser únicamente relacionada con tech. Puede ser ayudando gente en cocinas, ayudando a personas entregando domicilios, ayudando a crear una librería, cualquier cosa en el mundo que ayude a un ser humano. - **[11:45]** Muestra que somos humanos, que somos seres profesionales modernos, que tenemos una experiencia humana que compartimos con el mundo y eso también es muy importante. - > 👉 Ahora a actualizar sus perfiles con lo que hemos aprendido en éste video. ## Parte 3: Endorsements, recommendations, accomplishments, interests, open to work, URL settings @@ -147,11 +146,9 @@ Acá está el video: [https://www.loom.com/share/23450a56da8f4d4996177b4e8e55673 - Opción que permite mostrar a los reclutadores de que estás abierto a buscar empleos. - Esto lo puedes configurar en tus settings. - Hay dos opciones: - - **[7:26]** Una pública, que todo el mundo puede ver, y que se muestra en tu foto de perfil como un banner verde. - - **[7:36]** Una privada, que solo los reclutadores pueden ver. - + - **[7:26]** Una pública, que todo el mundo puede ver, y que se muestra en tu foto de perfil como un banner verde. + - **[7:36]** Una privada, que solo los reclutadores pueden ver. > 📢 **[8:32]** Ahora que hemos visto todo esto, es su turno de actualizar su perfil de LinkedIn y una vez finalicen, **envíen esto a su mentor para poder recibir feedback**. - -Muchas gracias a todos por atender la sesión y buena suerte con su búsqueda 🚀. \ No newline at end of file +Muchas gracias a todos por atender la sesión y buena suerte con su búsqueda 🚀. diff --git a/learning-modules/what-to-include-on-linkedin.md b/learning-modules/what-to-include-on-linkedin.md index 095d247..20dbd0b 100644 --- a/learning-modules/what-to-include-on-linkedin.md +++ b/learning-modules/what-to-include-on-linkedin.md @@ -18,8 +18,8 @@ In this lesson, we will go over each of the main parts of a LinkedIn profile. To # Let’s get started! -> En éste link pueden ver notas en español donde podrán encontrar un resúmen de los videos en “What to include on your LinkedIn profile” -> +> En éste link pueden ver notas en español donde podrán encontrar un resúmen de los videos en “What to include on your LinkedIn profile” +> > [Spanish - What to include on your Linkedin profile](what-to-include-on-linkedin-spanish.md) ### Part 1: Photo, title, background, About Section, Featured Section diff --git a/src/App.jsx b/src/App.jsx index f5e6008..b4b5227 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,10 +1,10 @@ -import { BrowserRouter as Router, Routes, Route } from 'react-router-dom'; +import { BrowserRouter as Router, Routes, Route } from "react-router-dom"; -import { Home, Layout, List, ManageList } from './views'; +import { Home, Layout, List, ManageList } from "./views"; -import { useAuth, useShoppingListData, useShoppingLists } from './api'; +import { useAuth, useShoppingListData, useShoppingLists } from "./api"; -import { useStateWithStorage } from './utils'; +import { useStateWithStorage } from "./utils"; export function App() { /** @@ -16,7 +16,7 @@ export function App() { * to create and switch between lists. */ const [listPath, setListPath] = useStateWithStorage( - 'tcl-shopping-list-path', + "tcl-shopping-list-path", null, ); diff --git a/src/api/config.js b/src/api/config.js index b7580ea..99e3fae 100644 --- a/src/api/config.js +++ b/src/api/config.js @@ -1,6 +1,6 @@ -import { initializeApp } from 'firebase/app'; -import { getFirestore } from 'firebase/firestore'; -import { getAuth } from 'firebase/auth'; +import { initializeApp } from "firebase/app"; +import { getFirestore } from "firebase/firestore"; +import { getAuth } from "firebase/auth"; // Your web app's Firebase configuration const firebaseConfig = { @@ -9,8 +9,8 @@ const firebaseConfig = { projectId: "tcl-77-smart-shopping-list", storageBucket: "tcl-77-smart-shopping-list.appspot.com", messagingSenderId: "35210747522", - appId: "1:35210747522:web:e39f63e23150653f0f1e9b" - }; + appId: "1:35210747522:web:e39f63e23150653f0f1e9b", +}; // Initialize Firebase const app = initializeApp(firebaseConfig); diff --git a/src/api/firebase.js b/src/api/firebase.js index 66bc91a..60cbb99 100644 --- a/src/api/firebase.js +++ b/src/api/firebase.js @@ -6,10 +6,10 @@ import { doc, onSnapshot, updateDoc, -} from 'firebase/firestore'; -import { useEffect, useState } from 'react'; -import { db } from './config'; -import { getFutureDate } from '../utils'; +} from "firebase/firestore"; +import { useEffect, useState } from "react"; +import { db } from "./config"; +import { getFutureDate } from "../utils"; /** * A custom hook that subscribes to the user's shopping lists in our Firestore @@ -29,7 +29,7 @@ export function useShoppingLists(userId, userEmail) { if (!userId || !userEmail) return; // When we get a userEmail, we use it to subscribe to real-time updates - const userDocRef = doc(db, 'users', userEmail); + const userDocRef = doc(db, "users", userEmail); onSnapshot(userDocRef, (docSnap) => { if (docSnap.exists()) { @@ -63,7 +63,7 @@ export function useShoppingListData(listPath) { // When we get a listPath, we use it to subscribe to real-time updates // from Firestore. - return onSnapshot(collection(db, listPath, 'items'), (snapshot) => { + return onSnapshot(collection(db, listPath, "items"), (snapshot) => { // The snapshot is a real-time update. We iterate over the documents in it // to get the data. const nextData = snapshot.docs.map((docSnapshot) => { @@ -92,7 +92,7 @@ export function useShoppingListData(listPath) { */ export async function addUserToDatabase(user) { // Check if the user already exists in the database. - const userDoc = await getDoc(doc(db, 'users', user.email)); + const userDoc = await getDoc(doc(db, "users", user.email)); // If the user already exists, we don't need to do anything. if (userDoc.exists()) { return; @@ -101,7 +101,7 @@ export async function addUserToDatabase(user) { // We'll use the user's email as the document id // because it's more likely that the user will know their email // than their uid. - await setDoc(doc(db, 'users', user.email), { + await setDoc(doc(db, "users", user.email), { email: user.email, name: user.displayName, uid: user.uid, @@ -122,7 +122,7 @@ export async function createList(userId, userEmail, listName) { owner: userId, }); - const userDocumentRef = doc(db, 'users', userEmail); + const userDocumentRef = doc(db, "users", userEmail); updateDoc(userDocumentRef, { sharedLists: arrayUnion(listDocRef), @@ -140,7 +140,7 @@ export async function shareList(listPath, currentUserId, recipientEmail) { return; } // Get the document for the recipient user. - const usersCollectionRef = collection(db, 'users'); + const usersCollectionRef = collection(db, "users"); const recipientDoc = await getDoc(doc(usersCollectionRef, recipientEmail)); // If the recipient user doesn't exist, we can't share the list. if (!recipientDoc.exists()) { @@ -148,7 +148,7 @@ export async function shareList(listPath, currentUserId, recipientEmail) { } // Add the list to the recipient user's sharedLists array. const listDocumentRef = doc(db, listPath); - const userDocumentRef = doc(db, 'users', recipientEmail); + const userDocumentRef = doc(db, "users", recipientEmail); updateDoc(userDocumentRef, { sharedLists: arrayUnion(listDocumentRef), }); @@ -162,7 +162,7 @@ export async function shareList(listPath, currentUserId, recipientEmail) { * @param {number} itemData.daysUntilNextPurchase The number of days until the user thinks they'll need to buy the item again. */ export async function addItem(listPath, { itemName, daysUntilNextPurchase }) { - const listCollectionRef = collection(db, listPath, 'items'); + const listCollectionRef = collection(db, listPath, "items"); // TODO: Replace this call to console.log with the appropriate // Firebase function, so this information is sent to your database! return console.log(listCollectionRef, { diff --git a/src/api/index.js b/src/api/index.js index cfb8131..2879bf0 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -1,2 +1,2 @@ -export * from './firebase'; -export { useAuth } from './useAuth'; +export * from "./firebase"; +export { useAuth } from "./useAuth"; diff --git a/src/api/useAuth.jsx b/src/api/useAuth.jsx index ca07ae6..16d1f64 100644 --- a/src/api/useAuth.jsx +++ b/src/api/useAuth.jsx @@ -1,7 +1,7 @@ -import { useEffect, useState } from 'react'; -import { auth } from './config.js'; -import { GoogleAuthProvider, signInWithPopup } from 'firebase/auth'; -import { addUserToDatabase } from './firebase.js'; +import { useEffect, useState } from "react"; +import { auth } from "./config.js"; +import { GoogleAuthProvider, signInWithPopup } from "firebase/auth"; +import { addUserToDatabase } from "./firebase.js"; /** * A button that signs the user in using Google OAuth. When clicked, diff --git a/src/components/ListItem.jsx b/src/components/ListItem.jsx index d047322..bc28df9 100644 --- a/src/components/ListItem.jsx +++ b/src/components/ListItem.jsx @@ -1,4 +1,4 @@ -import './ListItem.css'; +import "./ListItem.css"; export function ListItem({ name }) { return
  • {name}
  • ; diff --git a/src/components/SingleList.jsx b/src/components/SingleList.jsx index 49d1885..fb6583f 100644 --- a/src/components/SingleList.jsx +++ b/src/components/SingleList.jsx @@ -1,4 +1,4 @@ -import './SingleList.css'; +import "./SingleList.css"; export function SingleList({ name, path, setListPath }) { function handleClick() { diff --git a/src/components/index.js b/src/components/index.js index 561a06a..f67c1d6 100644 --- a/src/components/index.js +++ b/src/components/index.js @@ -1,2 +1,2 @@ -export * from './ListItem'; -export * from './SingleList'; +export * from "./ListItem"; +export * from "./SingleList"; diff --git a/src/index.jsx b/src/index.jsx index 551896b..839b119 100644 --- a/src/index.jsx +++ b/src/index.jsx @@ -1,10 +1,10 @@ -import { StrictMode } from 'react'; -import { createRoot } from 'react-dom/client'; -import { App } from './App'; +import { StrictMode } from "react"; +import { createRoot } from "react-dom/client"; +import { App } from "./App"; -import './index.css'; +import "./index.css"; -const root = createRoot(document.getElementById('root')); +const root = createRoot(document.getElementById("root")); root.render( diff --git a/src/utils/hooks.js b/src/utils/hooks.js index 92a06ca..4a98e1a 100644 --- a/src/utils/hooks.js +++ b/src/utils/hooks.js @@ -1,4 +1,4 @@ -import { useEffect, useState } from 'react'; +import { useEffect, useState } from "react"; /** * Set some state in React, and also persist that value in localStorage. diff --git a/src/utils/index.js b/src/utils/index.js index 363e519..9243f7a 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -1,2 +1,2 @@ -export * from './dates'; -export * from './hooks'; +export * from "./dates"; +export * from "./hooks"; diff --git a/src/views/Home.jsx b/src/views/Home.jsx index b86dadf..3d4c2bc 100644 --- a/src/views/Home.jsx +++ b/src/views/Home.jsx @@ -1,5 +1,5 @@ -import './Home.css'; -import { SingleList } from '../components'; +import "./Home.css"; +import { SingleList } from "../components"; export function Home({ data, setListPath }) { const hasList = data.length !== 0; diff --git a/src/views/Layout.jsx b/src/views/Layout.jsx index a1964ad..b2012d5 100644 --- a/src/views/Layout.jsx +++ b/src/views/Layout.jsx @@ -1,7 +1,7 @@ -import { Outlet, NavLink } from 'react-router-dom'; -import { useAuth, SignInButton, SignOutButton } from '../api/useAuth'; +import { Outlet, NavLink } from "react-router-dom"; +import { useAuth, SignInButton, SignOutButton } from "../api/useAuth"; -import './Layout.css'; +import "./Layout.css"; // 1) import NavLink component diff --git a/src/views/List.jsx b/src/views/List.jsx index a755db0..13738f2 100644 --- a/src/views/List.jsx +++ b/src/views/List.jsx @@ -1,4 +1,4 @@ -import { ListItem } from '../components'; +import { ListItem } from "../components"; export function List({ data }) { const hasItem = data.length !== 0; diff --git a/src/views/index.js b/src/views/index.js index 9f10e56..cb89d32 100644 --- a/src/views/index.js +++ b/src/views/index.js @@ -1,4 +1,4 @@ -export * from './ManageList'; -export * from './Home'; -export * from './Layout'; -export * from './List'; +export * from "./ManageList"; +export * from "./Home"; +export * from "./Layout"; +export * from "./List"; diff --git a/tests/App.test.jsx b/tests/App.test.jsx index 002f557..98d03dd 100644 --- a/tests/App.test.jsx +++ b/tests/App.test.jsx @@ -1,6 +1,6 @@ -import { render } from '@testing-library/react'; -import { App } from '../src/App'; +import { render } from "@testing-library/react"; +import { App } from "../src/App"; -it('renders without crashing', () => { +it("renders without crashing", () => { render(); }); diff --git a/tests/setup.js b/tests/setup.js index 2f80441..5bd3947 100644 --- a/tests/setup.js +++ b/tests/setup.js @@ -2,4 +2,4 @@ // allows you to do things like: // expect(element).toHaveTextContent(/react/i) // learn more: https://github.com/testing-library/jest-dom -import '@testing-library/jest-dom/vitest'; +import "@testing-library/jest-dom/vitest"; diff --git a/vite.config.js b/vite.config.js index 9360385..fe66119 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,63 +1,63 @@ -import { defineConfig } from 'vite'; -import eslint from '@nabla/vite-plugin-eslint'; -import react from '@vitejs/plugin-react'; -import svgr from 'vite-plugin-svgr'; -import { VitePWA } from 'vite-plugin-pwa'; +import { defineConfig } from "vite"; +import eslint from "@nabla/vite-plugin-eslint"; +import react from "@vitejs/plugin-react"; +import svgr from "vite-plugin-svgr"; +import { VitePWA } from "vite-plugin-pwa"; const PWAConfig = { - includeAssets: ['favicon.ico', 'robots.txt'], + includeAssets: ["favicon.ico", "robots.txt"], manifest: { - short_name: 'Smart Shopping List', - name: 'TCL Smart Shopping List', + short_name: "Smart Shopping List", + name: "TCL Smart Shopping List", description: "A smart shopping list that learns your purchase habits and makes suggestions, so you don't forget to buy what's important.", icons: [ { - src: 'favicon.ico', - sizes: '64x64 32x32 24x24 16x16', - type: 'image/x-icon', + src: "favicon.ico", + sizes: "64x64 32x32 24x24 16x16", + type: "image/x-icon", }, { - src: 'logo192.png', - type: 'image/png', - sizes: '192x192', + src: "logo192.png", + type: "image/png", + sizes: "192x192", }, { - src: 'logo512.png', - type: 'image/png', - sizes: '512x512', + src: "logo512.png", + type: "image/png", + sizes: "512x512", }, ], - start_url: '.', - display: 'standalone', - theme_color: '#000000', - background_color: '#ffffff', + start_url: ".", + display: "standalone", + theme_color: "#000000", + background_color: "#ffffff", }, }; // https://vitejs.dev/config/ export default defineConfig(({ mode }) => ({ build: { - outDir: './build', - target: 'esnext', + outDir: "./build", + target: "esnext", rollupOptions: { output: { manualChunks: (id) => { - if (id.includes('node_modules')) { - if (id.includes('react')) { - return 'vendor__react'; + if (id.includes("node_modules")) { + if (id.includes("react")) { + return "vendor__react"; } - if (id.includes('firebase')) { - return 'vendor__firebase'; + if (id.includes("firebase")) { + return "vendor__firebase"; } - return 'vendor'; + return "vendor"; } }, }, }, }, plugins: [ - mode === 'development' && eslint(), + mode === "development" && eslint(), react(), svgr({ exportAsDefault: true }), VitePWA(PWAConfig), @@ -65,7 +65,7 @@ export default defineConfig(({ mode }) => ({ server: { open: true, port: 3000 }, test: { globals: true, - environment: 'jsdom', - setupFiles: './tests/setup.js', + environment: "jsdom", + setupFiles: "./tests/setup.js", }, }));