mirror of
https://github.com/vercel/commerce.git
synced 2025-03-14 22:42:33 +00:00
Adding gradient on the clientside
This commit is contained in:
parent
a6ad6daa6f
commit
b1c476f3e4
@ -1,12 +1,5 @@
|
||||
import cn from 'classnames'
|
||||
import {
|
||||
FC,
|
||||
useState,
|
||||
useMemo,
|
||||
useRef,
|
||||
useEffect,
|
||||
HTMLInputElement,
|
||||
} from 'react'
|
||||
import { FC, useState, useMemo, useRef, useEffect } from 'react'
|
||||
import { getRandomPairOfColors } from '@lib/colors'
|
||||
|
||||
interface Props {
|
||||
@ -16,7 +9,7 @@ interface Props {
|
||||
|
||||
const Avatar: FC<Props> = ({}) => {
|
||||
const [bg] = useState(useMemo(() => getRandomPairOfColors, []))
|
||||
const ref = useRef(null) as React.MutableRefObject<HTMLInputElement>
|
||||
let ref = useRef() as React.MutableRefObject<HTMLInputElement>
|
||||
|
||||
useEffect(() => {
|
||||
if (ref && ref.current) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user