mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-02 16:16:39 +08:00
optimize
This commit is contained in:
parent
869d3ab27b
commit
448fc1a8f2
9
app/app/(admin)/components/users-table.modules.scss
Normal file
9
app/app/(admin)/components/users-table.modules.scss
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
input {
|
||||||
|
text-align: left !important
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.ant-input {
|
||||||
|
text-align: left !important
|
||||||
|
}
|
@ -1,5 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
|
import "./users-table.modules.scss";
|
||||||
import React, { Dispatch, SetStateAction, useEffect, useState } from "react";
|
import React, { Dispatch, SetStateAction, useEffect, useState } from "react";
|
||||||
import { User } from "@prisma/client";
|
import { User } from "@prisma/client";
|
||||||
import {
|
import {
|
||||||
@ -50,7 +51,7 @@ function UserTableSearchInput({ users, setUsers, setLoading }: UserInterface) {
|
|||||||
setLoading(true);
|
setLoading(true);
|
||||||
const fetchUsers = async () => {
|
const fetchUsers = async () => {
|
||||||
try {
|
try {
|
||||||
const url = new URL("/api/admin/users/", window.location.href);
|
const url = new URL("/api/admin/users", window.location.href);
|
||||||
url.searchParams.append("search", searchText);
|
url.searchParams.append("search", searchText);
|
||||||
console.log(url, "url");
|
console.log(url, "url");
|
||||||
const response = await fetch(url);
|
const response = await fetch(url);
|
||||||
@ -95,7 +96,7 @@ function UsersTable({ users, setUsers, loading }: UserInterface) {
|
|||||||
const confirmPassword = async (id: string) => {
|
const confirmPassword = async (id: string) => {
|
||||||
console.log("-----", newPassword, id);
|
console.log("-----", newPassword, id);
|
||||||
try {
|
try {
|
||||||
fetch(`/api/admin/users/${id}/`, {
|
fetch(`/api/admin/users/${id}`, {
|
||||||
method: "put",
|
method: "put",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
|
@ -9,10 +9,6 @@
|
|||||||
margin-right: auto
|
margin-right: auto
|
||||||
}
|
}
|
||||||
|
|
||||||
input {
|
|
||||||
text-align: left !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.signin hr {
|
.signin hr {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
border: 0;
|
border: 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user