Skip to content

elbhiruni/fem-url-shortening-api-landing-page

Repository files navigation

Frontend Mentor - Shortly URL shortening API Challenge solution

This is a solution to the Shortly URL shortening API Challenge challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.

Table of contents

Overview

The challenge

Users should be able to:

  • View the optimal layout for the site depending on their device's screen size
  • Shorten any valid URL
  • See a list of their shortened links, even after refreshing the browser
  • Copy the shortened link to their clipboard in a single click
  • Receive an error message when the form is submitted if:
    • The input field is empty

Screenshot

Links

My process

Built with

What I learned

// react with jsx
const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(<h1>Hello, world!</h1>);
// axios with async/await
async function getData() {
  try {
    const response = await axios.get("url");
    console.log(response);
  } catch (error) {
    console.error(error);
  }
}
// styled-components
const Button = styled.button`
  background-color: hsl(180, 66%, 49%);
`;

Author