Skip to content

Commit

Permalink
chore: optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
guoxianzhe committed Jun 12, 2024
1 parent 93c5817 commit 89152b3
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion examples/basic/src/pages/hook/useClientEvent/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { ConnectionDisconnectedReason, ConnectionState } from "agora-rtc-react";
import { useClientEvent, useJoin, useRTCClient } from "agora-rtc-react";
import { List, Typography } from "antd";
import { useEffect, useState } from "react";
import { useState } from "react";

import { Container, MediaControl, Room } from "../../../components";
import { appConfig } from "../../../utils";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { IRemoteAudioTrack, IRemoteVideoTrack, VideoPlayerConfig } from "ag
import { FakeRTCClient } from "agora-rtc-sdk-ng-fake";
import { describe, expect, test, vi } from "vitest";

import { LocalVideoTrack, RemoteUser } from "../../src/components";
import { RemoteUser } from "../../src/components";
import * as fun from "../../src/components/TrackBoundary";
import { AgoraRTCProvider } from "../../src/hooks";
import * as clientHook from "../../src/hooks";
Expand Down
5 changes: 2 additions & 3 deletions scripts/docs/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,9 @@ async function writeComment(markdownPath: string) {
const markdown = fs.readFileSync(markdownPath, "utf-8");
const result = md.render(markdown, "utf-8");
const dom: Document = new jsdom.JSDOM(result).window.document;

const target = dom.querySelector("H2")?.innerHTML.replace(/<code>(.*?)<\/code>/g, "$1");
const target = dom.querySelector("h2")?.innerHTML.replace(/<code>(.*?)<\/code>/g, "$1");
const targetDescriptionDOMList = getElementsBetween(
dom.querySelector("H2"),
dom.querySelector("h2"),
dom.querySelectorAll("h4")[0],
);

Expand Down
2 changes: 1 addition & 1 deletion scripts/docs/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ async function writeComment(markdownPath: string) {
const result = md.render(markdown, "utf-8");
const dom: Document = new jsdom.JSDOM(result).window.document;

const target = dom.querySelector("H2")?.innerHTML.replace(/<code>(.*?)<\/code>/g, "$1");
const target = dom.querySelector("h2")?.innerHTML.replace(/<code>(.*?)<\/code>/g, "$1");
const targetDescription = dom
.querySelectorAll("p")[0]
?.innerHTML.replace(/<code>(.*?)<\/code>/g, "$1");
Expand Down
2 changes: 1 addition & 1 deletion scripts/docs/data-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ async function writeComment(markdownPath: string) {
const result = md.render(markdown, "utf-8");
const dom: Document = new jsdom.JSDOM(result).window.document;

const target = dom.querySelector("H2")?.innerHTML.replace(/<code>(.*?)<\/code>/g, "$1");
const target = dom.querySelector("h2")?.innerHTML.replace(/<code>(.*?)<\/code>/g, "$1");
const targetDescription = dom
.querySelectorAll("p")[0]
?.innerHTML.replace(/<code>(.*?)<\/code>/g, "$1");
Expand Down

0 comments on commit 89152b3

Please sign in to comment.