<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Bakare Olayinka on Medium]]></title>
        <description><![CDATA[Stories by Bakare Olayinka on Medium]]></description>
        <link>https://medium.com/@yinkabakare30?source=rss-d864430b46dc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*pCzFc0LUuttFEurN</url>
            <title>Stories by Bakare Olayinka on Medium</title>
            <link>https://medium.com/@yinkabakare30?source=rss-d864430b46dc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 03:47:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@yinkabakare30/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Stutern Housemanship — Squazzle Documentation by Olayinka]]></title>
            <link>https://medium.com/@yinkabakare30/stutern-housemanship-squazzle-documentation-by-olayinka-56b1970d7e93?source=rss-d864430b46dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/56b1970d7e93</guid>
            <dc:creator><![CDATA[Bakare Olayinka]]></dc:creator>
            <pubDate>Fri, 14 Oct 2022 19:34:59 GMT</pubDate>
            <atom:updated>2022-12-10T18:45:39.249Z</atom:updated>
            <content:encoded><![CDATA[<h3>Stutern Housemanship — Squazzle Documentation by Olayinka</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/910/1*0gfWd6GSjYJdBZyAJ44spQ.png" /></figure><h4><strong>Task 1 — Implementing Pre-commit and Pre-push (Husky, Lint-staged, &amp; Pretty-quick)</strong></h4><p>Git hooks are scripts, such as <strong>commit</strong>, <strong>push</strong>, etc., that run automatically every time a particular event occurs in a Git repository. Git hook scripts are useful for identifying simple issues before submission to code review. We run our hooks on every commit to automatically point out issues in code, such as missing semicolons, trailing whitespace, and debug statements. Pointing these issues out before code review allows a code reviewer to focus on the architecture of a change while not wasting time with trivial style nitpicks.</p><p>This article attempts to help you set up Git Hooks in a few minutes.</p><h4>Requirements</h4><p>If you want to follow this tutorial, you must have installed and configured:</p><ul><li><strong>React App</strong></li><li><strong>ESLint</strong> — Listing, Enforcing Style Guide</li><li><strong>Prettier</strong> — Code Formatting</li></ul><h4>How does git hooks work?</h4><p>Every Git repository has a .git/hooks folder with a script for each hook you can bind to. You&#39;re free to change or update these scripts as necessary, and Git will execute them when those events occur.</p><h4>Why should I care?</h4><p>Fair question! Git hooks can greatly increase your productivity as a developer. For example, being able to push to your staging or production environment without ever leaving Git is just plain awesome. Update your code, make a commit, and push, and your code can run in any environment you specify.</p><h4>Pre-commit and Pre-push</h4><p>This is a pretty important step. This will ensure that before any developer commits any code, the changes made by him are validated with ESLint, and the code is properly formatted.</p><p><strong>Step 1</strong> — To implement this, we need to configure some packages</p><ul><li>First package we need is husky hook to make sure that every line of code being pushed is linted and all the tests pass.</li><li>We also need a package called lint-staged that will let us check only the pages which are changed. So, only the staged files are checked, and the rest of the code remains untouched.</li><li>pretty-quick will check for any unformatted files and format them using Prettier.</li></ul><pre>npm i -D husky lint-staged pretty-quick --save-dev</pre><p><strong>Step 2 </strong>— After installing these packages, we need to add configuration for“husky”: and “lint-staged”section into your package.json file.</p><pre>&quot;devDependencies&quot;: {<br><strong>   ...</strong><br>},<br> &quot;lint-staged&quot;: {<br>  &quot;*.js&quot;: &quot;eslint&quot;<br> },<br> &quot;husky&quot;: {<br>  &quot;hooks&quot;: {<br>   &quot;pre-commit&quot;: &quot;npm run lint-fix lint-staged &amp;&amp; pretty-quick --staged&quot;,<br>   &quot;pre-push&quot;: &quot;npm run test:all&quot;<br>  }<br> },<br> &quot;test:all&quot;: &quot;set CI=true &amp;&amp; react-scripts test &amp;&amp; npm run lint&quot;<br>}</pre><p>Congratulations! Now you have Git hooks that will run your tests and lint your code automatically each time you commit your code.</p><p>Pretty awesome, huh?</p><h4><strong>Task 2 — Implementing Axios</strong></h4><h4>What is Axios?</h4><p>In simple terms Axios is a very popular JavaScript library that allows you to make HTTP requests to a RESTful or a GraphQL API. Axios accomplishes the same task as the fetch API provided by many browsers. Under the hood Axios makes use of Promises. If you are interested in learning more about Promises. If you are interested in learning more about Promises please click <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise">here</a>. By using Axios it’s easy to send asynchronous HTTPrequests to REST endpoints and perform CRUD operations.</p><h4>Prerequisites To Use Axios</h4><p><strong>Step 1</strong> — In order to use Axios you first need to have Node.js installed in your computer. In case you don’t please click on this <a href="https://nodejs.org/en/">link</a>. This link will take you to the official Node.js website, which provides the necessary steps for installing Node.</p><p><strong>Step 2</strong>— Next we must add Axios to your project. To accomplish this just run the following command in your terminal (always make sure you are in the correct directory):</p><pre>npm install axios</pre><p>If you use yarn, the following command will work for you:</p><pre>yarn add axios</pre><p>This downloads the library and installs it in the <em>node_modules</em> folder.</p><h4>Task 3 — Implementing layout for verifying an email address</h4><p>This page displays after a user click the <em>create account </em>button on the signup page. The user verifies the email address validity by clicking <em>continue </em>button which then navigates the user to a 6-digit code email verification page to complete email verification.</p><p><strong>Step 1</strong> — <em>Implement verify email layout and style it</em></p><p>I started off by implementing a responsive layout of the verify email page and styling it with Tailwind CSS. The layout is shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oY7VV8pUrNxqd151C30JfQ.png" /><figcaption>Layout to check for user email validity</figcaption></figure><p><strong>Step 2 </strong>— <em>Handle routing of the verify email page</em></p><p>Imported useNavigate() from react-router-dom, assigned the<em> useNavigate() </em>function to a variable for ease of use, and also imported NonAuthRoutes from its location within the project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/458/1*HEcoFrpVtZeK-3SCY647KQ.png" /><figcaption>Navigation Setup</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/530/1*OSuxVRQ6JI32MD1YFdiqXw.png" /><figcaption>verify email NonAuthRoutes location</figcaption></figure><p><strong>Step 3 — </strong><em>Handle verify email submit button</em></p><p>I set an onClick() handler on the <em>continue</em> button to navigate to <em>NonAuthRoutes.enterEmailVerificationCode. </em>I then created a function <em>handleVerifyEmail. </em>Within the function, I placed the navigation to redirect to the <em>email verification code page</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/905/1*BqrX7JiDcfHjJZ1SmP0cRA.png" /><figcaption>onClick handler</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/1*SO-VyOthNpx70nR8t_m-Tg.png" /><figcaption>handleVerifyEmail function</figcaption></figure><h4>Task 4A — Implement layout for viewing my accommodation detail</h4><p>This page displays accommodation details which consist of uploaded images of listed accommodations, user information i.e <em>accommodation name</em>, <em>accommodation description</em>, <em>reason for listing this accommodation</em>, <em>accommodation type</em>, <em>accommodation rules</em>, <em>accommodation status i.e available or occupied</em>, <em>hosting duration and location. </em>The page also consists of call-to-action (CTA) buttons i.e <em>Edit </em>button<em> — </em>to edit listed accommodations<em> and a Back </em>button — which goes back to initial account overview page.</p><p><strong>Step 1</strong> <strong>—</strong> <em>Implement accommodation detail layout and style it with tailwind CSS</em></p><p>I started off by implementing a responsive layout of the accommodation detail page and styling it with Tailwind CSS. The layout is shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nd8_WlrO1Vl2Z_J7eeZAjQ.png" /><figcaption>accommodation details</figcaption></figure><p>The code for implemented layout can be found in the GitHub repository link <a href="https://github.com/StuternHousemanship/SQUAZZLE-Frontend-Project-Team1.1/blob/staging/src/pages/dashboard/accommodationDetails.js">here</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=56b1970d7e93" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>