merge de dev dans fixcss
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import styles from "./SearchBar.module.css";
|
||||
import { Link } from "react-router";
|
||||
import { useEffect, useState } from "react";
|
||||
import searchEvents from "../../utils/events/searchEvents.js";
|
||||
import searchUsers from "../../utils/users/searchUsers.js";
|
||||
import searchEvents from "../../utils/events/searchEvents";
|
||||
import searchUsers from "../../utils/users/searchUsers";
|
||||
import { useLocation } from "react-router";
|
||||
|
||||
function SearchBar(): any {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useEffect, useState } from "react";
|
||||
import getEventById from "../../utils/events/getEventById.js";
|
||||
import getEventById from "../../utils/events/getEventById";
|
||||
import styles from "./Task.module.css";
|
||||
import formatDate from "../../utils/date/formatDate";
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ export default function CreateEventBtn() {
|
||||
setIsOpen(false);
|
||||
}
|
||||
|
||||
if(!user.isAdmin) return null;
|
||||
if(!user?.isAdmin) return null;
|
||||
|
||||
return <>
|
||||
<Button className={`${styles.createButton} glassCard`} variant={"default"} onClick={() => setIsOpen(true)}> + </Button>
|
||||
|
||||
@@ -11,14 +11,14 @@ interface TextInputProps extends InputHTMLAttributes<HTMLInputElement> {
|
||||
}
|
||||
|
||||
const TextInput = ({
|
||||
placeholder,
|
||||
onChange,
|
||||
value,
|
||||
borderStyle = "square",
|
||||
password,
|
||||
className = "",
|
||||
...props
|
||||
}: TextInputProps) => {
|
||||
placeholder = "",
|
||||
onChange,
|
||||
value = "",
|
||||
borderStyle = "square",
|
||||
password = false,
|
||||
className = "",
|
||||
...props
|
||||
}: TextInputProps) => {
|
||||
const [showPassword, setShowPassword] = useState<boolean>(false);
|
||||
|
||||
let inputBorderStyle = styles.square;
|
||||
@@ -28,15 +28,16 @@ const TextInput = ({
|
||||
setShowPassword((prev) => !prev);
|
||||
};
|
||||
|
||||
if (password)
|
||||
if (password) {
|
||||
return (
|
||||
<div className={styles.passwordContainer}>
|
||||
<TextInput
|
||||
<input
|
||||
type={showPassword ? "text" : "password"}
|
||||
value={value}
|
||||
placeholder={placeholder}
|
||||
onChange={onChange}
|
||||
className={styles.passwordInput}
|
||||
className={`${styles.input} ${styles.passwordInput} ${inputBorderStyle} ${className}`}
|
||||
{...props}
|
||||
/>
|
||||
<button
|
||||
type="button"
|
||||
@@ -47,6 +48,7 @@ const TextInput = ({
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<input
|
||||
|
||||
Reference in New Issue
Block a user