Skip to content

Commit

Permalink
Removed useless placeholder props
Browse files Browse the repository at this point in the history
  • Loading branch information
Zusoy committed May 13, 2024
1 parent 626c44f commit 9576f28
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 36 deletions.
5 changes: 2 additions & 3 deletions apps/client/src/features/Channels/List/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,16 @@ const List: React.FC<Props> = ({ stationId, stationName, onNewChannel }) => {
}, [dispatch, stationId])

return (
<Card className='flex flex-col w-72 h-[calc(100vh-78px)] rounded-none bg-white' placeholder={undefined}>
<Card className='flex flex-col w-72 h-[calc(100vh-78px)] rounded-none bg-white'>
<StationControls stationName={stationName} onNewChannel={onNewChannel} />
<MatList placeholder={undefined}>
<MatList>
{isFetching
? <Fallback prediction={6} />
: items.map(
channel =>
<ListItem
key={channel.id}
selected={current === channel.id}
placeholder={undefined}
onClick={() => changeChannelHandler(channel.id)}
>
{channel.name}
Expand Down
7 changes: 3 additions & 4 deletions apps/client/src/features/Me/Authentication/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,20 @@ const Authenticate: React.FC = () => {

return (
<div className='flex h-screen'>
<Card className="w-96 m-auto" placeholder={undefined}>
<Card className="w-96 m-auto">
<form onSubmit={onSubmitHandler}>
<CardHeader
variant="gradient"
color="gray"
className="mb-4 grid h-28 place-items-center"
placeholder={undefined}
>
<Typography variant="h4" color="white">Welcome</Typography>
</CardHeader>
<CardBody className="flex flex-col gap-4" placeholder={undefined}>
<CardBody className="flex flex-col gap-4">
<Input name='username' label="Email" placeholder='Email' size="lg" required />
<Input name='password' label="Password" placeholder='Password' size="lg" type='password' required />
</CardBody>
<CardFooter className="pt-0" placeholder={undefined}>
<CardFooter className="pt-0">
<Button variant="gradient" type='submit' fullWidth>
Sign In
</Button>
Expand Down
8 changes: 4 additions & 4 deletions apps/client/src/features/Me/Logout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ const Logout: React.FC<Props> = ({ opened, handler }) => {
}

return (
<Dialog open={opened} handler={handler} placeholder={undefined}>
<Dialog open={opened} handler={handler}>
<form onSubmit={onSubmitHandler}>
<DialogHeader placeholder={undefined}>Logout</DialogHeader>
<DialogBody placeholder={undefined}>
<DialogHeader>Logout</DialogHeader>
<DialogBody>
Are you sure to logout from your account ?
</DialogBody>
<DialogFooter placeholder={undefined}>
<DialogFooter>
<Button
variant='text'
className='mr-1'
Expand Down
1 change: 0 additions & 1 deletion apps/client/src/features/Messages/Messenger/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ const Messenger: React.FC<Props> = ({ channelId }) => {
className='rounded-full'
type='submit'
disabled={!content.trim().length}
placeholder={undefined}
>
<svg
xmlns="http://www.w3.org/2000/svg"
Expand Down
13 changes: 6 additions & 7 deletions apps/client/src/features/Navbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ const NavList: React.FC<NavListProps> = ({ onLogout }) =>
<ul className="my-2 flex flex-col gap-2 lg:mb-0 lg:mt-0 lg:flex-row lg:items-center lg:gap-6">
<Menu>
<MenuHandler>
<IconButton className='rounded-full' placeholder={undefined}>
<IconButton className='rounded-full'>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth="1.5" stroke="currentColor" className="w-6 h-6">
<path strokeLinecap="round" strokeLinejoin="round" d="M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
</svg>
</IconButton>
</MenuHandler>
<MenuList placeholder={undefined}>
<MenuItem className="flex items-center gap-2" placeholder={undefined}>
<MenuList>
<MenuItem className="flex items-center gap-2">
<svg
width="16"
height="16"
Expand All @@ -47,7 +47,7 @@ const NavList: React.FC<NavListProps> = ({ onLogout }) =>
My Profile
</Typography>
</MenuItem>
<MenuItem className="flex items-center gap-2" placeholder={undefined}>
<MenuItem className="flex items-center gap-2">
<svg
width="16"
height="16"
Expand All @@ -67,7 +67,7 @@ const NavList: React.FC<NavListProps> = ({ onLogout }) =>
</Typography>
</MenuItem>
<hr className="my-2 border-blue-gray-50" />
<MenuItem className="flex items-center gap-2" placeholder={undefined}>
<MenuItem className="flex items-center gap-2">
<svg
width="16"
height="14"
Expand Down Expand Up @@ -106,7 +106,7 @@ const Navbar: React.FC<Props> = ({ onLogout }) => {
}, [])

return (
<MatNavbar className="mx-auto w-screen" fullWidth placeholder={undefined}>
<MatNavbar className="mx-auto w-screen" fullWidth>
<div className="flex items-center justify-between text-blue-gray-900">
<Typography
as="a"
Expand All @@ -129,7 +129,6 @@ const Navbar: React.FC<Props> = ({ onLogout }) => {
className="ml-auto h-6 w-6 text-inherit hover:bg-transparent focus:bg-transparent active:bg-transparent lg:hidden"
ripple={false}
onClick={() => setOpened(!opened)}
placeholder={undefined}
>
{opened ? (
<XMarkIcon className="h-6 w-6" strokeWidth={2} />
Expand Down
8 changes: 4 additions & 4 deletions apps/client/src/features/Stations/JoinOrCreateDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ const JoinOrCreateDialog: React.FC<Props> = ({ opened, handler }) => {
<CardBody className="flex flex-col gap-4">
<Typography variant='h3' className='text-center'>Add station</Typography>
<Tabs value='join'>
<TabsHeader placeholder={undefined}>
<Tab value='join' placeholder={undefined}>Join</Tab>
<Tab value='create' placeholder={undefined}>Create</Tab>
<TabsHeader>
<Tab value='join'>Join</Tab>
<Tab value='create'>Create</Tab>
</TabsHeader>
<TabsBody placeholder={undefined}>
<TabsBody>
<div className='w-full'>
<TabPanel value='join' className='p-0'>
<Join />
Expand Down
10 changes: 5 additions & 5 deletions apps/client/src/features/Stations/StationControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,27 +31,27 @@ const StationControl: React.FC<Props> = ({ stationName, onNewChannel }) => {
/>
</Button>
</MenuHandler>
<MenuList placeholder={undefined}>
<MenuItem className='flex items-center gap-2' onClick={onNewChannel} placeholder={undefined}>
<MenuList>
<MenuItem className='flex items-center gap-2' onClick={onNewChannel}>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth="1.5" stroke="currentColor" className="w-6 h-6">
<path strokeLinecap="round" strokeLinejoin="round" d="M12 9v6m3-3H9m12 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" />
</svg>
<Typography variant='small'>Add Channel</Typography>
</MenuItem>
<MenuItem className='flex items-center gap-2' placeholder={undefined}>
<MenuItem className='flex items-center gap-2'>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth="1.5" stroke="currentColor" className="w-6 h-6">
<path strokeLinecap="round" strokeLinejoin="round" d="M18 7.5v3m0 0v3m0-3h3m-3 0h-3m-2.25-4.125a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0ZM3 19.235v-.11a6.375 6.375 0 0 1 12.75 0v.109A12.318 12.318 0 0 1 9.374 21c-2.331 0-4.512-.645-6.374-1.766Z" />
</svg>
<Typography variant='small'>Invite peoples</Typography>
</MenuItem>
<MenuItem className='flex items-center gap-2' placeholder={undefined}>
<MenuItem className='flex items-center gap-2'>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth="1.5" stroke="currentColor" className="w-6 h-6">
<path strokeLinecap="round" strokeLinejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z" />
<path strokeLinecap="round" strokeLinejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
</svg>
<Typography variant='small'>Settings</Typography>
</MenuItem>
<MenuItem className='flex items-center gap-2' placeholder={undefined}>
<MenuItem className='flex items-center gap-2'>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth="1.5" stroke="currentColor" className="w-6 h-6">
<path strokeLinecap="round" strokeLinejoin="round" d="M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V4.125Z" />
</svg>
Expand Down
2 changes: 1 addition & 1 deletion apps/client/src/widgets/Buttons/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Button as MatButton, type ButtonProps } from '@material-tailwind/react'
export type Props = ButtonProps & RefAttributes<HTMLButtonElement>

const Button: React.FC<Props> = ({ children, ...props }) =>
<MatButton {...props} placeholder={undefined}>
<MatButton {...props}>
{children}
</MatButton>

Expand Down
1 change: 0 additions & 1 deletion apps/client/src/widgets/Channel/ChannelSkeleton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const ChannelSkeleton: React.FC = () =>
as="div"
variant="h1"
className="mb-4 h-4 w-56 rounded-full bg-gray-300"
placeholder={undefined}
>
&nbsp;
</Typography>
Expand Down
5 changes: 2 additions & 3 deletions apps/client/src/widgets/Message/Message.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,18 @@ const Message: React.FC<Props> = ({ id, authorName, content, createdAt }) =>
<Avatar
src='https://docs.material-tailwind.com/img/face-2.jpg'
alt={authorName}
placeholder={undefined}
/>
</div>
<div className='flex flex-col w-full justify-center'>
<div className='flex flex-row gap-4 items-center'>
<Typography variant='lead' placeholder={undefined}>{authorName}</Typography>
<Typography variant='lead'>{authorName}</Typography>
<Chip
size='sm'
value={(new Date(createdAt).toLocaleDateString())}
variant='ghost'
/>
</div>
<Typography variant='paragraph' placeholder={undefined}>{content}</Typography>
<Typography variant='paragraph'>{content}</Typography>
</div>
</div>

Expand Down
4 changes: 1 addition & 3 deletions apps/client/src/widgets/Message/MessageSkeleton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Typography } from '@material-tailwind/react'
const MessageSkeleton: React.FC = () =>
<div className='flex flex-row min-w-full gap-2 p-4 justify-center bg-blue-gray-50 animate-pulse'>
<div className='flex justify-center'>
<Typography as='div' className='rounded-full bg-gray-300 w-8 h-8' placeholder={undefined}>
<Typography as='div' className='rounded-full bg-gray-300 w-8 h-8'>
&nbsp;
</Typography>
</div>
Expand All @@ -13,15 +13,13 @@ const MessageSkeleton: React.FC = () =>
as='div'
variant='lead'
className='mb-2 h-2 w-72 rounded-full bg-gray-300'
placeholder={undefined}
>
&nbsp;
</Typography>
<Typography
as='div'
variant='paragraph'
className='mb-2 h-2 w-72 rounded-full bg-gray-300'
placeholder={undefined}
>
&nbsp;
</Typography>
Expand Down

0 comments on commit 9576f28

Please sign in to comment.