-
Notifications
You must be signed in to change notification settings - Fork 18
feat: Added share link option to gurubu planner #359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
15cc706
to
10c401b
Compare
useEffect(() => { | ||
const fetchDataFromUrl = async () => { | ||
const teamFromUrl = searchParams.get('team'); | ||
const boardFromUrl = searchParams.get('board'); | ||
const boardSearchFromUrl = searchParams.get('boardSearch'); | ||
|
||
if (teamFromUrl) { | ||
const response = await pService.getOrganizationDetails(teamFromUrl); | ||
if (response.isSuccess && response.data) { | ||
setAssignees(response.data); | ||
localStorage.setItem('JIRA_DEFAULT_ASSIGNEES', JSON.stringify(response.data)); | ||
} | ||
} | ||
|
||
if (boardSearchFromUrl) { | ||
await fetchBoards(boardSearchFromUrl); | ||
} | ||
|
||
if (boardFromUrl) { | ||
try { | ||
const response = await fetch(`${process.env.NEXT_PUBLIC_API_URL}/jira/${boardFromUrl}/future`); | ||
const data: SprintResponse = await response.json(); | ||
setSprints(data.values); | ||
localStorage.setItem('JIRA_BOARD', boardFromUrl); | ||
handleRefresh(); | ||
} catch (error) { | ||
console.error('Error fetching future sprints:', error); | ||
} | ||
} | ||
}; | ||
|
||
fetchDataFromUrl(); | ||
}, [searchParams]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is searchParams constantly updated, for example, I wonder if this place will be hit every time I press a character.
useEffect(() => { | ||
const teamFromUrl = searchParams.get('team'); | ||
const boardFromUrl = searchParams.get('board'); | ||
|
||
if (teamFromUrl) setSelectedTeam(teamFromUrl); | ||
if (boardFromUrl) setSelectedBoard(boardFromUrl); | ||
}, [searchParams]); | ||
|
||
useEffect(() => { | ||
const fetchDataFromUrl = async () => { | ||
const teamFromUrl = searchParams.get('team'); | ||
const boardFromUrl = searchParams.get('board'); | ||
const boardSearchFromUrl = searchParams.get('boardSearch'); | ||
|
||
if (teamFromUrl) { | ||
const response = await pService.getOrganizationDetails(teamFromUrl); | ||
if (response.isSuccess && response.data) { | ||
setAssignees(response.data); | ||
localStorage.setItem('JIRA_DEFAULT_ASSIGNEES', JSON.stringify(response.data)); | ||
} | ||
} | ||
|
||
if (boardSearchFromUrl) { | ||
await fetchBoards(boardSearchFromUrl); | ||
} | ||
|
||
if (boardFromUrl) { | ||
try { | ||
const response = await fetch(`${process.env.NEXT_PUBLIC_API_URL}/jira/${boardFromUrl}/future`); | ||
const data: SprintResponse = await response.json(); | ||
setSprints(data.values); | ||
localStorage.setItem('JIRA_BOARD', boardFromUrl); | ||
handleRefresh(); | ||
} catch (error) { | ||
console.error('Error fetching future sprints:', error); | ||
} | ||
} | ||
}; | ||
|
||
fetchDataFromUrl(); | ||
}, [searchParams]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very similar to the code above
please enter pr details @Aegean09 🚀 , may be too short |
@mertcanaltin this pr is not ready for review mate, I'm trying to solve conflicts with the previous merged pr (enes') |
I got it, mate, I marked your pr as WIP (it means you working on it) |
2d27200
to
9610b8b
Compare
@mertcanaltin i'm going to merge this, is your comments resolved? |
if you don't have any problems we can unite, my question is not too critical @armagandalkiran |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Gurubu Planner Share Link Feature
This PR adds a link-sharing functionality to Gurubu Planner. Users can now share their planner configuration via URL, allowing others to bypass the initial team selection process and directly access the same planner view. Additionally, I've created a new PlannerContext to improve state management throughout the application.
Key Features
Technical Implementation
Related Issues
Closes #354