This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.users-table-container { | |
overflow-x: auto; | |
box-shadow: var(--shadow); | |
border-radius: 0.2rem; | |
} | |
.users-table-container .users-table { | |
border-spacing: 0; | |
text-transform: capitalize; | |
min-width: 35rem; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useState, useEffect } from 'react'; | |
const API_BASE_URL = 'https://jsonplaceholder.typicode.com'; // Ex: API link, replace with required API URL | |
/** | |
* @param endpoint endpoint to fetch data from | |
* @returns { data, error, loading } | |
*/ | |
export function useFetch(endpoint){ | |
const [data, setData] = useState(null); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// RenderSmoothImage.jsx | |
import React from "react"; | |
import './styles.scss'; | |
export default ({ src, alt = "notFound", objectFit = "contain" }) => { | |
const [imageLoaded, setImageLoaded] = React.useState(false); | |
const [isValidSrc, setIsValidSrc] = React.useState(!!src); | |
return ( |