θΏ™ζ˜―indexlocζδΎ›ηš„ζœεŠ‘οΌŒδΈθ¦θΎ“ε…₯任何密码
Skip to content

Fix/dom nesting warnings #3773

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 17 additions & 16 deletions frontend/src/components/Sidebar/ActiveWorkspaces/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@ import ManageWorkspace, {
useManageWorkspaceModal,
} from "../../Modals/ManageWorkspace";
import paths from "@/utils/paths";
import { useParams } from "react-router-dom";
import { useParams, useNavigate } from "react-router-dom";
import { GearSix, UploadSimple, DotsSixVertical } from "@phosphor-icons/react";
import useUser from "@/hooks/useUser";
import ThreadContainer from "./ThreadContainer";
import { Link, useMatch } from "react-router-dom";
import { useMatch } from "react-router-dom";
import { DragDropContext, Droppable, Draggable } from "react-beautiful-dnd";
import showToast from "@/utils/toast";

export default function ActiveWorkspaces() {
const navigate = useNavigate();
const { slug } = useParams();
const [loading, setLoading] = useState(true);
const [workspaces, setWorkspaces] = useState([]);
Expand Down Expand Up @@ -154,19 +155,20 @@ export default function ActiveWorkspaces() {
}}
className="border-none rounded-md flex items-center justify-center ml-auto p-[2px] hover:bg-[#646768] text-[#A7A8A9] hover:text-white"
>
<UploadSimple
className="h-[20px] w-[20px]"
// weight="bold"
/>
<UploadSimple className="h-[20px] w-[20px]" />
</button>
<Link
to={
isInWorkspaceSettings
? paths.workspace.chat(workspace.slug)
: paths.workspace.settings.generalAppearance(
workspace.slug
)
}
<button
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
navigate(
isInWorkspaceSettings
? paths.workspace.chat(workspace.slug)
: paths.workspace.settings.generalAppearance(
workspace.slug
)
);
}}
className="rounded-md flex items-center justify-center text-[#A7A8A9] hover:text-white ml-auto p-[2px] hover:bg-[#646768]"
aria-label="General appearance settings"
>
Expand All @@ -177,10 +179,9 @@ export default function ActiveWorkspaces() {
? "#46C8FF"
: undefined
}
// weight="bold"
className="h-[20px] w-[20px]"
/>
</Link>
</button>
</div>
)}
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useEffect, useState, useRef } from "react";
import { useEffect, useState, useRef, Fragment } from "react";
import { chatPrompt } from "@/utils/chat";
import { useTranslation } from "react-i18next";
import SystemPromptVariable from "@/models/systemPromptVariable";
Expand Down Expand Up @@ -52,15 +52,12 @@ export default function ChatPromptSettings({ workspace, setHasChanges }) {
</Link>{" "}
like:{" "}
{availableVariables.slice(0, 3).map((v, i) => (
<>
<span
key={v.key}
className="bg-theme-settings-input-bg px-1 py-0.5 rounded"
>
<Fragment key={v.key}>
<span className="bg-theme-settings-input-bg px-1 py-0.5 rounded">
{`{${v.key}}`}
</span>
{i < availableVariables.length - 1 && ", "}
</>
</Fragment>
))}
{availableVariables.length > 3 && (
<Link
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ export default function SuggestedChatMessages({ slug }) {
<p className="text-white text-opacity-60 text-xs font-medium py-1.5">
{t("general.message.description")}
</p>
<p className="text-white text-opacity-60 text-sm font-medium mt-6">
<div className="text-white text-opacity-60 text-sm font-medium mt-6">
<PreLoader size="4" />
</p>
</div>
</div>
);
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ export default function VectorCount({ reload, workspace }) {
<p className="text-white text-opacity-60 text-xs font-medium py-1">
{t("general.vector.description")}
</p>
<p className="text-white text-opacity-60 text-sm font-medium">
<div className="text-white text-opacity-60 text-sm font-medium">
<PreLoader size="4" />
</p>
</div>
</div>
);
return (
Expand Down