-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bd93341
commit 0777520
Showing
4 changed files
with
58 additions
and
7 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// EmptyQuip.tsx | ||
import { useState } from "react"; | ||
import { useTranslation } from "react-i18next"; | ||
|
||
export function EmptyQuip() { | ||
const { t } = useTranslation(); | ||
const [randN] = useState(Math.floor(Math.random() * 100)); | ||
const emptyTranslations = ( | ||
t("views.home.noLiveStreams", { returnObjects: true }) as string[] | ||
).filter((x) => !!x); | ||
|
||
if (!emptyTranslations) return null; | ||
|
||
return ( | ||
<div className="p-4 text-base-11 md:px-8"> | ||
{emptyTranslations[randN % emptyTranslations.length]} | ||
</div> | ||
); | ||
} |
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