Rename NoElements to Empty

This commit is contained in:
1ilit 2024-03-16 22:24:16 +02:00
parent 5895d4c96e
commit d4bc5a9669
6 changed files with 11 additions and 11 deletions

View File

@ -24,7 +24,7 @@ import {
import useUndoRedo from "../hooks/useUndoRedo"; import useUndoRedo from "../hooks/useUndoRedo";
import useAreas from "../hooks/useAreas"; import useAreas from "../hooks/useAreas";
import useSaveState from "../hooks/useSaveState"; import useSaveState from "../hooks/useSaveState";
import NoElements from "./NoElements"; import Empty from "./Empty";
export default function AreasOverview() { export default function AreasOverview() {
const { setSaveState } = useSaveState(); const { setSaveState } = useSaveState();
@ -73,7 +73,7 @@ export default function AreasOverview() {
</Col> </Col>
</Row> </Row>
{areas.length <= 0 ? ( {areas.length <= 0 ? (
<NoElements <Empty
title="No subject areas" title="No subject areas"
text="Add subject areas to organize tables!" text="Add subject areas to organize tables!"
/> />

View File

@ -2,12 +2,12 @@ import {
IllustrationNoContent, IllustrationNoContent,
IllustrationNoContentDark, IllustrationNoContentDark,
} from "@douyinfe/semi-illustrations"; } from "@douyinfe/semi-illustrations";
import { Empty } from "@douyinfe/semi-ui"; import { Empty as SemiUIEmpty } from "@douyinfe/semi-ui";
export default function NoElements({ title, text }) { export default function Empty({ title, text }) {
return ( return (
<div className="select-none mt-2"> <div className="select-none mt-2">
<Empty <SemiUIEmpty
image={<IllustrationNoContent style={{ width: 154, height: 154 }} />} image={<IllustrationNoContent style={{ width: 154, height: 154 }} />}
darkModeImage={ darkModeImage={
<IllustrationNoContentDark style={{ width: 154, height: 154 }} /> <IllustrationNoContentDark style={{ width: 154, height: 154 }} />

View File

@ -19,7 +19,7 @@ import {
import { noteThemes, Action, ObjectType } from "../data/constants"; import { noteThemes, Action, ObjectType } from "../data/constants";
import useUndoRedo from "../hooks/useUndoRedo"; import useUndoRedo from "../hooks/useUndoRedo";
import useNotes from "../hooks/useNotes"; import useNotes from "../hooks/useNotes";
import NoElements from "./NoElements"; import Empty from "./Empty";
export default function NotesOverview() { export default function NotesOverview() {
const { notes, updateNote, addNote, deleteNote } = useNotes(); const { notes, updateNote, addNote, deleteNote } = useNotes();
@ -69,7 +69,7 @@ export default function NotesOverview() {
</Col> </Col>
</Row> </Row>
{notes.length <= 0 ? ( {notes.length <= 0 ? (
<NoElements title="No text notes" text="Add notes cuz why not!" /> <Empty title="No text notes" text="Add notes cuz why not!" />
) : ( ) : (
<Collapse <Collapse
activeKey={activeKey} activeKey={activeKey}

View File

@ -18,7 +18,7 @@ import {
import { Cardinality, Constraint, Action, ObjectType } from "../data/constants"; import { Cardinality, Constraint, Action, ObjectType } from "../data/constants";
import useTables from "../hooks/useTables"; import useTables from "../hooks/useTables";
import useUndoRedo from "../hooks/useUndoRedo"; import useUndoRedo from "../hooks/useUndoRedo";
import NoElements from "./NoElements"; import Empty from "./Empty";
export default function RelationshipsOverview() { export default function RelationshipsOverview() {
const { relationships } = useTables(); const { relationships } = useTables();
@ -62,7 +62,7 @@ export default function RelationshipsOverview() {
accordion accordion
> >
{relationships.length <= 0 ? ( {relationships.length <= 0 ? (
<NoElements <Empty
title="No relationships" title="No relationships"
text="Drag to connect fields and form relationships!" text="Drag to connect fields and form relationships!"
/> />

View File

@ -35,7 +35,7 @@ import useTables from "../hooks/useTables";
import useUndoRedo from "../hooks/useUndoRedo"; import useUndoRedo from "../hooks/useUndoRedo";
import useSelect from "../hooks/useSelect"; import useSelect from "../hooks/useSelect";
import useTypes from "../hooks/useTypes"; import useTypes from "../hooks/useTypes";
import NoElements from "./NoElements"; import NoElements from "./Empty";
export default function TablesOverview() { export default function TablesOverview() {
const [searchText, setSearchText] = useState(""); const [searchText, setSearchText] = useState("");

View File

@ -25,7 +25,7 @@ import {
import { isSized, hasPrecision, getSize } from "../utils/toSQL"; import { isSized, hasPrecision, getSize } from "../utils/toSQL";
import useUndoRedo from "../hooks/useUndoRedo"; import useUndoRedo from "../hooks/useUndoRedo";
import useTypes from "../hooks/useTypes"; import useTypes from "../hooks/useTypes";
import NoElements from "./NoElements"; import NoElements from "./Empty";
export default function TypesOverview() { export default function TypesOverview() {
const [value, setValue] = useState(""); const [value, setValue] = useState("");