Skip to content

JCPenne/whoofer

Repository files navigation

Whoofer

A stylized Dog Breed Quiz App, written in React & NextJS. Built for a deeper understanding of React, NextJS and CSS Modules. For having fun, and for the love of dogs!

Highlights

The Quiz Page houses numerous rendering logic and helper functions for the Quiz itself.

The Utils folder houses a custom Randomizer function to provide a random sequence of questions to each user of the quiz

export function getRandomQuestion(usedQuestions) {
  let max = Questions.length - 1;
  let min = 0;
  let randomNum = Math.floor(Math.random() * (max - min + 1) + min);

  while (usedQuestions.includes(randomNum)) {
    randomNum = Math.floor(Math.random() * (max - min + 1) + min);
  }
  return [randomNum, Questions[randomNum]];
}

Getting Started

This site is hosted on Whoofer and the live version can be visited there.

For a local version, once you have cloned the repo, run npm i to install all dependencies. And then npm run dev to fire up a local NextJS server instance.

Built With

Acknowledgments

About

Dog breed quiz in NextJS & React

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published