aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/atoms/links/social-link
Commit message (Collapse)AuthorAgeFilesLines
* build: improve bundle sizeArmand Philippot2023-12-201-5/+23
| | | | | | | | | * add `sideEffects` in package.json to activate tree shaking for barrel files * use dynamic imports on social links and icons * resize social media images * resize large project image (demo apcom) * resize website logo
* refactor(stories): migrate stories to CSF3 formatArmand Philippot2023-12-152-66/+43
|
* fix: generate an id for each headings in the page main contentsArmand Philippot2023-11-181-1/+1
| | | | | | | | | | | | | | | | | | | | Since #be4d907 the ids was no longer addded to headings in useHeadingsTree hook. It was a bad practice to manipulate the DOM that way. However, I did not move the implementation elsewhere... To fix this, I now use rehype-slug on both markdown contents and html string coming from WordPress. I'm not sure the dynamic imports are really useful here since the table of contents is on almost all pages but Jest was failing with regular import because of ESM. It is the only thing that makes the tests functional again so... However if we want to test the `updateContentTree` function, Jest fails for the same reason. So I decided to not test this function. I've already spend too much time on this issue. Another problem: the ToC on projects page. Currently we use the ref on the body but the page contents are imported dynamically so the hook is executed before the contents are loaded. It makes the ToC empty... We should refactor the pages so we can use the ref directly on the imported contents.
* refactor(components): rewrite SocialLink componentArmand Philippot2023-11-115-0/+232
* replace default label with a label prop * rename name prop to icon prop