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:
commit
fdf6a1d008
4 changed files with 23 additions and 12 deletions
|
@ -7,7 +7,7 @@ A scrum poker tool that helps agile teams plan their sprints in real-time.
|
|||
- Front-end framework: Nextjs
|
||||
- Front-end library: Preact
|
||||
- Rendering method: SSR SPA
|
||||
- Hosting: Railway
|
||||
- Hosting: Vercel
|
||||
- Real-time pub/sub: Ably
|
||||
- ORM: Prisma
|
||||
- Database: PostgreSQL
|
||||
|
|
|
@ -13,12 +13,14 @@ const config = {
|
|||
domains: ["avatars.githubusercontent.com", "lh3.googleusercontent.com"],
|
||||
},
|
||||
webpack: (config, { dev, isServer }) => {
|
||||
Object.assign(config.resolve.alias, {
|
||||
"react/jsx-runtime.js": "preact/compat/jsx-runtime",
|
||||
react: "preact/compat",
|
||||
"react-dom/test-utils": "preact/test-utils",
|
||||
"react-dom": "preact/compat",
|
||||
});
|
||||
if (!dev && !isServer) {
|
||||
Object.assign(config.resolve.alias, {
|
||||
"react/jsx-runtime.js": "preact/compat/jsx-runtime",
|
||||
react: "preact/compat",
|
||||
"react-dom/test-utils": "preact/test-utils",
|
||||
"react-dom": "preact/compat",
|
||||
});
|
||||
}
|
||||
return config;
|
||||
},
|
||||
};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "sprintpadawan",
|
||||
"version": "1.2.2",
|
||||
"version": "1.2.3",
|
||||
"description": "Plan. Sprint. Repeat.",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
|
|
@ -71,6 +71,7 @@ const RoomBody: React.FC = () => {
|
|||
|
||||
const [storyNameText, setStoryNameText] = useState<string>("");
|
||||
const [roomScale, setRoomScale] = useState<string>("");
|
||||
const [copied, setCopied] = useState<boolean>(false);
|
||||
|
||||
const { data: roomFromDb, refetch: refetchRoomFromDb } =
|
||||
api.room.get.useQuery({ id: roomId });
|
||||
|
@ -203,6 +204,10 @@ const RoomBody: React.FC = () => {
|
|||
.writeText(window.location.href)
|
||||
.then(() => {
|
||||
console.log(`Copied Room Link to Clipboard!`);
|
||||
setCopied(true);
|
||||
setTimeout(() => {
|
||||
setCopied(false);
|
||||
}, 2000);
|
||||
})
|
||||
.catch(() => {
|
||||
console.log(`Error Copying Room Link to Clipboard!`);
|
||||
|
@ -252,10 +257,14 @@ const RoomBody: React.FC = () => {
|
|||
<div>{roomFromDb.id}</div>
|
||||
|
||||
<button>
|
||||
<IoCopyOutline
|
||||
className="mx-1 hover:text-primary"
|
||||
onClick={copyRoomURLHandler}
|
||||
></IoCopyOutline>
|
||||
{copied ? (
|
||||
<IoCheckmarkCircleOutline className="mx-1 text-green-400 animate-bounce" />
|
||||
) : (
|
||||
<IoCopyOutline
|
||||
className="mx-1 hover:text-primary"
|
||||
onClick={copyRoomURLHandler}
|
||||
></IoCopyOutline>
|
||||
)}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue