Merge pull request #24 from atridadl/dev

1.2.3
 Updated Caching
 Added proper indicator for if copying the room code was successful
🚧 Dependency updates
🚧 Switched to Postgres
This commit is contained in:
Atridad Lahiji 2023-07-10 00:51:34 -06:00 committed by GitHub
commit fdf6a1d008
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 12 deletions

View file

@ -7,7 +7,7 @@ A scrum poker tool that helps agile teams plan their sprints in real-time.
- Front-end framework: Nextjs - Front-end framework: Nextjs
- Front-end library: Preact - Front-end library: Preact
- Rendering method: SSR SPA - Rendering method: SSR SPA
- Hosting: Railway - Hosting: Vercel
- Real-time pub/sub: Ably - Real-time pub/sub: Ably
- ORM: Prisma - ORM: Prisma
- Database: PostgreSQL - Database: PostgreSQL

View file

@ -13,12 +13,14 @@ const config = {
domains: ["avatars.githubusercontent.com", "lh3.googleusercontent.com"], domains: ["avatars.githubusercontent.com", "lh3.googleusercontent.com"],
}, },
webpack: (config, { dev, isServer }) => { webpack: (config, { dev, isServer }) => {
Object.assign(config.resolve.alias, { if (!dev && !isServer) {
"react/jsx-runtime.js": "preact/compat/jsx-runtime", Object.assign(config.resolve.alias, {
react: "preact/compat", "react/jsx-runtime.js": "preact/compat/jsx-runtime",
"react-dom/test-utils": "preact/test-utils", react: "preact/compat",
"react-dom": "preact/compat", "react-dom/test-utils": "preact/test-utils",
}); "react-dom": "preact/compat",
});
}
return config; return config;
}, },
}; };

View file

@ -1,6 +1,6 @@
{ {
"name": "sprintpadawan", "name": "sprintpadawan",
"version": "1.2.2", "version": "1.2.3",
"description": "Plan. Sprint. Repeat.", "description": "Plan. Sprint. Repeat.",
"private": true, "private": true,
"scripts": { "scripts": {

View file

@ -71,6 +71,7 @@ const RoomBody: React.FC = () => {
const [storyNameText, setStoryNameText] = useState<string>(""); const [storyNameText, setStoryNameText] = useState<string>("");
const [roomScale, setRoomScale] = useState<string>(""); const [roomScale, setRoomScale] = useState<string>("");
const [copied, setCopied] = useState<boolean>(false);
const { data: roomFromDb, refetch: refetchRoomFromDb } = const { data: roomFromDb, refetch: refetchRoomFromDb } =
api.room.get.useQuery({ id: roomId }); api.room.get.useQuery({ id: roomId });
@ -203,6 +204,10 @@ const RoomBody: React.FC = () => {
.writeText(window.location.href) .writeText(window.location.href)
.then(() => { .then(() => {
console.log(`Copied Room Link to Clipboard!`); console.log(`Copied Room Link to Clipboard!`);
setCopied(true);
setTimeout(() => {
setCopied(false);
}, 2000);
}) })
.catch(() => { .catch(() => {
console.log(`Error Copying Room Link to Clipboard!`); console.log(`Error Copying Room Link to Clipboard!`);
@ -252,10 +257,14 @@ const RoomBody: React.FC = () => {
<div>{roomFromDb.id}</div> <div>{roomFromDb.id}</div>
<button> <button>
<IoCopyOutline {copied ? (
className="mx-1 hover:text-primary" <IoCheckmarkCircleOutline className="mx-1 text-green-400 animate-bounce" />
onClick={copyRoomURLHandler} ) : (
></IoCopyOutline> <IoCopyOutline
className="mx-1 hover:text-primary"
onClick={copyRoomURLHandler}
></IoCopyOutline>
)}
</button> </button>
</div> </div>