Skip to content

Commit

Permalink
update UI
Browse files Browse the repository at this point in the history
  • Loading branch information
pth-1641 committed Jul 28, 2022
1 parent f03190b commit 65cce65
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/components/ChatContent/Input/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function Input({ roomId, theme, emoji, reply, setDisplayReply, setReply }) {
<MdEmojiEmotions />
{displayEmoji && (
<span
className='md:absolute right-0 bottom-14 fixed flex-center w-full'
className='md:absolute right-0 bottom-14 fixed flex-center w-full md:w-auto'
onClick={(e) => e.stopPropagation()}
>
<Picker
Expand Down
4 changes: 2 additions & 2 deletions src/components/ChatContent/Message/MyMessage.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useState, useContext } from 'react';
import { useState, useContext, useEffect } from 'react';
import { formatDate } from '../../../constants/moment';
import {
MdFileDownload,
Expand Down Expand Up @@ -29,7 +29,7 @@ function MyMessage({ message, theme, setLink }) {
<>
{replyMessage !== null && (
<p
className='px-3 py-2 rounded-lg w-56 md:max-w-md truncate dark:text-gray-200 text-black bg-gray-200 dark:bg-lightDark border-2 ml-auto mt-0.5'
className='px-3 py-2 rounded-lg md:max-w-m w-max max-w-[300px] truncate dark:text-gray-200 text-black bg-gray-200 dark:bg-lightDark border-2 ml-auto mt-0.5'
style={{ borderColor: theme }}
>
{replyMessage ? replyMessage : 'Removed Message'}
Expand Down
22 changes: 12 additions & 10 deletions src/pages/Login.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,6 @@ function Login() {
});
}, []);

const handleLogin = async (provider) => {
try {
const { user } = await signInWithPopup(auth, provider);
checkUser(user);
} catch (error) {
console.log(error);
}
};

const checkUser = async (user) => {
try {
const result = await getUser(user.uid);
Expand All @@ -39,9 +30,20 @@ function Login() {
}
};

const handleLogin = async (provider) => {
try {
const { user } = await signInWithPopup(auth, provider);
checkUser(user);
} catch (error) {
console.log(error);
}
};

return (
<div className='min-h-screen bg-gradient-to-br from-pink-600 to-indigo-800 flex flex-col justify-center items-center gap-4'>
<h1 className='text-white text-6xl font-medium mb-4'>MESSENGER</h1>
<h1 className='text-white md:text-6xl font-medium mb-4 text-[12vw]'>
MESSENGER
</h1>
<button
type='button'
className='login-btn bg-white text-black hover:bg-gray-300'
Expand Down
2 changes: 1 addition & 1 deletion src/styles/tailwind.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@apply flex items-center justify-between;
}
.login-btn {
@apply px-4 py-2 rounded flex justify-center items-center gap-2 font-medium;
@apply px-4 py-2 rounded flex-center gap-2;
}
.input-dark {
@apply dark:bg-lightDark px-4 py-2 rounded-xl w-full outline-none bg-gray-300 dark:text-white text-black;
Expand Down

1 comment on commit 65cce65

@vercel
Copy link

@vercel vercel bot commented on 65cce65 Jul 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

chat-app – ./

chat-app-pth-1641.vercel.app
chat-app-git-main-pth-1641.vercel.app
messenger-v02.vercel.app

Please sign in to comment.