Skip to content

Commit 04994a4

Browse files
Refactor props
1 parent 24c7552 commit 04994a4

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

site/src/pages/WorkspacePage/WorkspaceNotifications.tsx

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,15 @@ type WorkspaceNotificationsProps = {
3636
latestVersion?: TemplateVersion;
3737
};
3838

39-
export const WorkspaceNotifications: FC<WorkspaceNotificationsProps> = (
40-
props,
41-
) => {
42-
const {
43-
workspace,
44-
template,
45-
latestVersion,
46-
permissions,
47-
onRestartWorkspace,
48-
onUpdateWorkspace,
49-
onActivateWorkspace,
50-
} = props;
39+
export const WorkspaceNotifications: FC<WorkspaceNotificationsProps> = ({
40+
workspace,
41+
template,
42+
latestVersion,
43+
permissions,
44+
onRestartWorkspace,
45+
onUpdateWorkspace,
46+
onActivateWorkspace,
47+
}) => {
5148
const notifications: Notification[] = [];
5249

5350
// Outdated
@@ -262,8 +259,7 @@ type NotificationPillProps = {
262259
icon: ReactNode;
263260
};
264261

265-
const NotificationPill: FC<NotificationPillProps> = (props) => {
266-
const { notifications, type, icon } = props;
262+
const NotificationPill: FC<NotificationPillProps> = ({ notifications, type, icon }) => {
267263
const theme = useTheme();
268264

269265
return (
@@ -296,8 +292,11 @@ const NotificationPill: FC<NotificationPillProps> = (props) => {
296292
);
297293
};
298294

299-
const NotificationItem: FC<{ notification: Notification }> = (props) => {
300-
const { notification } = props;
295+
interface NotificationItemProps {
296+
notification: Notification;
297+
}
298+
299+
const NotificationItem: FC<NotificationItemProps> = ({ notification }) => {
301300
const theme = useTheme();
302301

303302
return (

0 commit comments

Comments
 (0)