Skip to content

Commit

Permalink
fix: 如果api是旧域名就改为新域名
Browse files Browse the repository at this point in the history
  • Loading branch information
14790897 committed May 11, 2024
1 parent 8ad486d commit a8c5392
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion components/QuillEditor.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import React, { useState, useEffect, useRef } from "react";
import React, { useState, useEffect, useRef, use } from "react";
import Quill from "quill";
import "quill/dist/quill.snow.css";
import { useLocalStorage } from "react-use";
Expand Down Expand Up @@ -253,6 +253,14 @@ const QEditor = ({ lng }) => {
// dispatch(setApiKey("sk-GHuPUV6ERD8wVmmr36FeB8D809D34d93Bb857c009f6aF9Fe"));
// dispatch(setUpsreamUrl("https://one.paperai.life"));
// });
useEffect(() => {
if (upsreamUrl === "https://one.liuweiqing.top") {
dispatch(
setApiKey("sk-GHuPUV6ERD8wVmmr36FeB8D809D34d93Bb857c009f6aF9Fe")
);
dispatch(setUpsreamUrl("https://one.paperai.life"));
}
}, [upsreamUrl]);
const handleTextChange = debounce(async function (delta, oldDelta, source) {
if (source === "user") {
// 获取编辑器内容
Expand Down

0 comments on commit a8c5392

Please sign in to comment.