Skip to content

Commit a246301

Browse files
committed
Fixes hydration error
1 parent 280932d commit a246301

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/features/auth/view/SignInTexts.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,11 @@ const getRandomTextColor = ({ excluding }: { excluding?: string } = {}) => {
1010
return colors[Math.floor(Math.random() * colors.length)]
1111
}
1212

13-
const INITIAL_TEXT_COLOR = getRandomTextColor()
14-
1513
const SignInTexts = ({ prefix }: { prefix: string }) => {
1614
const [characterIndex, setCharacterIndex] = useState(0)
1715
const [textIndex, setTextIndex] = useState(0)
1816
const [displayedText, setDisplayedText] = useState("")
19-
const [textColor, setTextColor] = useState(INITIAL_TEXT_COLOR)
17+
const [textColor, setTextColor] = useState(BASE_COLORS[0])
2018
const texts = useMemo(() => [
2119
"is a great OpenAPI viewer",
2220
"facilitates spec-driven development",

0 commit comments

Comments
 (0)