Skip to content

Instantly share code, notes, and snippets.

@migbash
Last active January 9, 2023 14:09
Show Gist options
  • Save migbash/6574372aaf597664fe60d4adc427b31f to your computer and use it in GitHub Desktop.
Save migbash/6574372aaf597664fe60d4adc427b31f to your computer and use it in GitHub Desktop.
BETARENA | INTERVIEW #010 TASK

PR

clonar o (repositório) usando **git**
https://github.com/Betarena/mission_enter_world_of_sports
[Either MAIN or TEST branches]
  • Desenvolva um rápido relógio de contagem regressiva com
    • svelte/sveltekit e
    • funções reativas e
    • métodos JS [sem grandes erros]
  • [EXTENSÃO] faz uso de um recurso de endpoint sveltekit +page.ts para fazer uso do método de carregamento dinâmico para extração de um número de destino, como, por exemplo:
    • /countdown/[countdown-int] => /10, que deve ser passado para o componente Countdownd - para informar o Countdown para iniciar a partir de 10 segundos.
  • [EXTENSÃO] relógio de contagem regressiva para ter um botão de reset
  • Relógio de contagem regressiva [EXTENSÃO] para reiniciar automaticamente quando atingir 00:00.

npm create svelte@latest betarena-interview
<-select the SKELETON PROJECT->
https://github.com/Betarena/mission_enter_world_of_sports

WEB-2

  • Develop a quick countdown clock with
    • svelte/sveltekit and
    • reactive functions and
    • JS methods [without major errors]
  • [EXTENSION]
    • make use of a +page.ts sveltekit endpoint feature to have make use of the dynamic load method, for extraction of a target number, such as, for example:
      • /countdown/[countdown-int] => /10, which should be passed down to the Countdownd component - to inform the Countdown to start from 10 seconds.
  • [EXTENSION]
    • countdown clock to have a reset button
  • [EXTENSION]
    • countdown clock to reset automatically when reaches 00:00.
  • [EXTENSION-UNEXPECTED]
    • Ask/do (if time remains) and if developer knows how to use localStorage() implementation, if yes:
      • Store data in the .localStorage() of the user browser - so when they refresh the page - check for data in .localSotrage() and reset the timer of the clock from last "save" of the clock.

WEB-3

  • [EXTENSION] the countdown clock to:
    • Auto-update and get a target smart-contract transactions and FILTER LARGE ARRAY OBJECT data obtained from Moralis for:
      • the ones done in the last Y seconds (and)
      • with a transaction value of greater than X
      • using Moralis API.
  • [EXTENSION] Display this auto-updated data under the countdown clock once it reaches 0, and every time it reaches 0 update the data (essentially a refreshing of the data).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment