Skip to content
View bintangmuh's full-sized avatar
🎯
Focusing
🎯
Focusing

Organizations

@infiniteuny

Block or report bintangmuh

Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse

Pinned Loading

  1. Dark Theme Hooks with Local Storage ... Dark Theme Hooks with Local Storage for Tailwind css
    1
    import { useEffect, useState } from "react"
    2
    
                  
    3
    export function useToggleTheme() {
    4
      const [theme, setTheme] = useState('dark')
    5
    
                  
  2. Rupiah number formatter Rupiah number formatter
    1
    export const convertToRupiah = (angka) => {
    2
      var rupiah = '';		
    3
      var angkarev = angka.toString().split('').reverse().join('');
    4
      for(var i = 0; i < angkarev.length; i++) if(i%3 == 0) rupiah += angkarev.substr(i,3)+'.';
    5
      return rupiah.split('',rupiah.length-1).reverse().join('');