Skip to content
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

[FE][CPF-75] My space page #90

Merged
merged 21 commits into from
Jul 10, 2024

Conversation

wiktoriasalamon
Copy link
Collaborator

@wiktoriasalamon wiktoriasalamon commented Jul 5, 2024

image

@wiktoriasalamon wiktoriasalamon changed the title 75 feature my space employee pov ladder [FE][CPF-75] My space page Jul 5, 2024
@wiktoriasalamon wiktoriasalamon marked this pull request as ready for review July 5, 2024 10:48
Comment on lines 43 to 59
const router = useRouter();
const pathname = usePathname();
const searchParams = useSearchParams();
const tab = searchParams.get('tab');
const [currentTab, setCurrentTab] = useState<string>(tab ?? DEFAULT_TAB);

const handleReplace = useCallback(() => {
if (!currentTab) {
router.replace(`${pathname}?tab=${DEFAULT_TAB}`);
} else {
router.replace(`${pathname}?tab=${currentTab}`);
}
}, [currentTab, pathname, router]);

useEffect(() => {
handleReplace();
}, [handleReplace]);
Copy link
Collaborator

Choose a reason for hiding this comment

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

i think we should move it to MySpace.hooks.ts

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

@wiktoriasalamon wiktoriasalamon merged commit baff627 into develop Jul 10, 2024
4 checks passed
@wiktoriasalamon wiktoriasalamon deleted the 75-feature-my-space---employee-pov---ladder branch July 10, 2024 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants