Reformatted files with biome.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { Button, Icon, Text, Modal, DialogTrigger, Dialog, useToast } from '@umami/react-zen';
|
||||
import { UserAddForm } from './UserAddForm';
|
||||
import { Button, Dialog, DialogTrigger, Icon, Modal, Text, useToast } from '@umami/react-zen';
|
||||
import { useMessages, useModified } from '@/components/hooks';
|
||||
import { Plus } from '@/components/icons';
|
||||
import { UserAddForm } from './UserAddForm';
|
||||
|
||||
export function UserAddButton({ onSave }: { onSave?: () => void }) {
|
||||
const { formatMessage, labels, messages } = useMessages();
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import {
|
||||
Select,
|
||||
ListItem,
|
||||
Form,
|
||||
FormField,
|
||||
FormButtons,
|
||||
FormSubmitButton,
|
||||
TextField,
|
||||
PasswordField,
|
||||
Button,
|
||||
Form,
|
||||
FormButtons,
|
||||
FormField,
|
||||
FormSubmitButton,
|
||||
ListItem,
|
||||
PasswordField,
|
||||
Select,
|
||||
TextField,
|
||||
} from '@umami/react-zen';
|
||||
import { useMessages, useUpdateQuery } from '@/components/hooks';
|
||||
import { ROLES } from '@/lib/constants';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Button, Icon, Modal, DialogTrigger, Dialog, Text } from '@umami/react-zen';
|
||||
import { useMessages, useLoginQuery } from '@/components/hooks';
|
||||
import { Button, Dialog, DialogTrigger, Icon, Modal, Text } from '@umami/react-zen';
|
||||
import { useLoginQuery, useMessages } from '@/components/hooks';
|
||||
import { Trash } from '@/components/icons';
|
||||
import { UserDeleteForm } from './UserDeleteForm';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { ReactNode } from 'react';
|
||||
import { DataGrid } from '@/components/common/DataGrid';
|
||||
import { useUsersQuery } from '@/components/hooks';
|
||||
import { UsersTable } from './UsersTable';
|
||||
import { ReactNode } from 'react';
|
||||
|
||||
export function UsersDataTable({ showActions }: { showActions?: boolean; children?: ReactNode }) {
|
||||
const queryResult = useUsersQuery();
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
'use client';
|
||||
import { UsersDataTable } from './UsersDataTable';
|
||||
import { Column } from '@umami/react-zen';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
import { UserAddButton } from './UserAddButton';
|
||||
import { PageHeader } from '@/components/common/PageHeader';
|
||||
import { Panel } from '@/components/common/Panel';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
import { UserAddButton } from './UserAddButton';
|
||||
import { UsersDataTable } from './UsersDataTable';
|
||||
|
||||
export function UsersPage() {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
import { useState } from 'react';
|
||||
import { Row, Text, Icon, DataTable, DataColumn, MenuItem, Modal } from '@umami/react-zen';
|
||||
import { DataColumn, DataTable, Icon, MenuItem, Modal, Row, Text } from '@umami/react-zen';
|
||||
import Link from 'next/link';
|
||||
import { ROLES } from '@/lib/constants';
|
||||
import { Trash } from '@/components/icons';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
import { Edit } from '@/components/icons';
|
||||
import { MenuButton } from '@/components/input/MenuButton';
|
||||
import { UserDeleteForm } from './UserDeleteForm';
|
||||
import { useState } from 'react';
|
||||
import { DateDistance } from '@/components/common/DateDistance';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
import { Edit, Trash } from '@/components/icons';
|
||||
import { MenuButton } from '@/components/input/MenuButton';
|
||||
import { ROLES } from '@/lib/constants';
|
||||
import { UserDeleteForm } from './UserDeleteForm';
|
||||
|
||||
export function UsersTable({
|
||||
data = [],
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import {
|
||||
Select,
|
||||
ListItem,
|
||||
Form,
|
||||
FormField,
|
||||
FormButtons,
|
||||
TextField,
|
||||
FormField,
|
||||
FormSubmitButton,
|
||||
ListItem,
|
||||
PasswordField,
|
||||
Select,
|
||||
TextField,
|
||||
} from '@umami/react-zen';
|
||||
import { useLoginQuery, useMessages, useUpdateQuery, useUser } from '@/components/hooks';
|
||||
import { ROLES } from '@/lib/constants';
|
||||
@@ -30,7 +30,7 @@ export function UserEditForm({ userId, onSave }: { userId: string; onSave?: () =
|
||||
};
|
||||
|
||||
return (
|
||||
<Form onSubmit={handleSubmit} error={getMessage(error?.['code'])} values={user}>
|
||||
<Form onSubmit={handleSubmit} error={getMessage(error?.code)} values={user}>
|
||||
<FormField name="username" label={formatMessage(labels.username)}>
|
||||
<TextField data-test="input-username" />
|
||||
</FormField>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { User } from '@/components/icons';
|
||||
import { PageHeader } from '@/components/common/PageHeader';
|
||||
import { useUser } from '@/components/hooks';
|
||||
import { User } from '@/components/icons';
|
||||
|
||||
export function UserHeader() {
|
||||
const user = useUser();
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
'use client';
|
||||
import { Column } from '@umami/react-zen';
|
||||
import { UserSettings } from './UserSettings';
|
||||
import { UserProvider } from './UserProvider';
|
||||
import { UserHeader } from '@/app/(main)/admin/users/[userId]/UserHeader';
|
||||
import { Panel } from '@/components/common/Panel';
|
||||
import { UserProvider } from './UserProvider';
|
||||
import { UserSettings } from './UserSettings';
|
||||
|
||||
export function UserPage({ userId }: { userId: string }) {
|
||||
return (
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { createContext, ReactNode } from 'react';
|
||||
import { Loading } from '@umami/react-zen';
|
||||
import { User } from '@/generated/prisma/client';
|
||||
import { createContext, type ReactNode } from 'react';
|
||||
import { useUserQuery } from '@/components/hooks/queries/useUserQuery';
|
||||
import type { User } from '@/generated/prisma/client';
|
||||
|
||||
export const UserContext = createContext<User>(null);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Column, Tabs, Tab, TabList, TabPanel } from '@umami/react-zen';
|
||||
import { UserEditForm } from './UserEditForm';
|
||||
import { Column, Tab, TabList, TabPanel, Tabs } from '@umami/react-zen';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
import { UserEditForm } from './UserEditForm';
|
||||
import { UserWebsites } from './UserWebsites';
|
||||
|
||||
export function UserSettings({ userId }: { userId: string }) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { WebsitesTable } from '@/app/(main)/websites/WebsitesTable';
|
||||
import { DataGrid } from '@/components/common/DataGrid';
|
||||
import { useUserWebsitesQuery } from '@/components/hooks';
|
||||
import { WebsitesTable } from '@/app/(main)/websites/WebsitesTable';
|
||||
|
||||
export function UserWebsites({ userId }) {
|
||||
const queryResult = useUserWebsitesQuery({ userId });
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { Metadata } from 'next';
|
||||
import { UserPage } from './UserPage';
|
||||
import { Metadata } from 'next';
|
||||
|
||||
export default async function ({ params }: { params: Promise<{ userId: string }> }) {
|
||||
const { userId } = await params;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Metadata } from 'next';
|
||||
import type { Metadata } from 'next';
|
||||
import { UsersPage } from './UsersPage';
|
||||
|
||||
export default function () {
|
||||
|
||||
Reference in New Issue
Block a user