Skip to content

Commit

Permalink
fix: ChatGPTNextWeb#965 improve loading animation
Browse files Browse the repository at this point in the history
  • Loading branch information
Yidadaa committed Apr 21, 2023
1 parent e1ce1f2 commit ab82636
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
5 changes: 4 additions & 1 deletion app/components/home.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,10 @@
.chat-message {
display: flex;
flex-direction: row;

&:last-child {
animation: slide-in ease 0.3s;
}
}

.chat-message-user {
Expand All @@ -325,7 +329,6 @@
display: flex;
flex-direction: column;
align-items: flex-start;
animation: slide-in ease 0.3s;

&:hover {
.chat-message-top-actions {
Expand Down
7 changes: 2 additions & 5 deletions app/components/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require("../polyfill");

import { useState, useEffect } from "react";
import { useState, useEffect, StyleHTMLAttributes } from "react";

import styles from "./home.module.scss";

Expand All @@ -23,6 +23,7 @@ import {
Route,
useLocation,
} from "react-router-dom";
import { SideBar } from "./sidebar";

export function Loading(props: { noLogo?: boolean }) {
return (
Expand All @@ -37,10 +38,6 @@ const Settings = dynamic(async () => (await import("./settings")).Settings, {
loading: () => <Loading noLogo />,
});

const SideBar = dynamic(async () => (await import("./sidebar")).SideBar, {
loading: () => <Loading noLogo />,
});

export function useSwitchTheme() {
const config = useChatStore((state) => state.config);

Expand Down

0 comments on commit ab82636

Please sign in to comment.