From 674796753dadd525465d5f68989ba231ee62210a Mon Sep 17 00:00:00 2001 From: Matt Kirby <MattJKirby@outlook.com> Date: Sat, 11 Mar 2023 21:40:06 +0000 Subject: [PATCH] Added basic hidden post component --- .../src/components/post/HiddenPost.tsx | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 daily-thought-frontend/src/components/post/HiddenPost.tsx diff --git a/daily-thought-frontend/src/components/post/HiddenPost.tsx b/daily-thought-frontend/src/components/post/HiddenPost.tsx new file mode 100644 index 00000000..936303d8 --- /dev/null +++ b/daily-thought-frontend/src/components/post/HiddenPost.tsx @@ -0,0 +1,25 @@ +import { FC, PropsWithChildren } from "react"; +import styles from "../../styles/HiddenPost.module.css" +import { BsEyeSlash } from 'react-icons/bs'; + +type HiddenPostProps ={ + UserColors: string[]; +} + +const HiddenPost: FC<PropsWithChildren<HiddenPostProps>> = ({ + UserColors +}) => { + const shuffledColors = UserColors.sort((a: string, b: string) => 0.5 - Math.random()); + + return ( + <div className={styles.hiddenCard}> + <div className={styles.hiddenCardContent}> + <BsEyeSlash size={50}/> + <p className={styles.title}>Post Hidden</p> + <p className={styles.text}>Post a thought to view</p> + </div> + </div> + ) +} + +export default HiddenPost; -- GitLab